{"openapi":"3.1.0","info":{"title":"PubNub Admin API","version":"2026-10-14","description":"PubNub's Admin API is a REST interface for developers and administrators who need to automate PubNub account management tasks, integrate PubNub configuration into CI/CD pipelines, or build custom provisioning tools.\n\nAdmin API allows you to manage your PubNub account configuration via a RESTful API.\nSee <img src=\"https://learning.postman.com/api/fern-docs/favicon.ico\" width=\"16\" /> [Postman collection for the API](https://www.postman.com/pubnub-api/pubnub-s-workspace/collection/47027560-ecd95879-a44b-41b2-87fd-f4da0f67abc7?action=share&source=copy-link&creator=0)\n\n## Multi-tenancy and SaaS apps\n\nThe Admin API helps you build multi-tenant, SaaS, and OEM solutions where you need to provision and manage PubNub resources programmatically for your customers.\n\n### Single PubNub instance per customer\n\nWhen you need a dedicated PubNub instance for each of your customers, use keysets. Each keyset provides:\n\n- Isolated publish/subscribe key pairs\n- Independent configuration for features like Presence, Access Manager, and Message Persistence\n- Separate usage tracking for billing and cost allocation\n\nThis approach works best when each customer needs their own isolated messaging environment with distinct settings.\n\n### Multiple PubNub instances per customer\n\nWhen a single customer needs multiple PubNub instances (for example, separate environments for development, staging, and production, or different product lines), use apps. Apps serve as logical containers that group related keysets together.\n\nA typical multi-tenant structure might look like:\n\n- One app per customer, which contains all keysets for that customer\n- One keyset per environment or product to separate production from testing, or for different use cases\n\n### Usage tracking for cost allocation\n\nThe Admin API lets you query usage metrics at different granularity levels:\n\n- Account level: Total usage across all apps and keysets\n- App level: Usage for a specific customer or product line\n- Keyset level: Granular usage for individual environments\n\nUse the [Usage endpoints](/docs/admin-api/usage-introduction) to retrieve metrics and allocate costs to your customers based on their actual consumption.\n\n### White-label and partner solutions\n\nIf you're building a white-label solution or want to become a PubNub partner with advanced multi-tenant capabilities, [contact our sales team](https://www.pubnub.com/company/contact-sales/) to discuss partnership options and custom arrangements.\n\nFor more information about the Partner Portal and managing end customers, refer to the [Partner Portal](/docs/general/portal/partner-portal) documentation.\n\n## Prerequisites\n\nTo use the Admin API, you must:\n\n- [Have a valid API key](#get-the-api-key). Only accounts with the **Owner** or **Account Admin** roles can create API keys. You can have more than one active API key per account.\n- [Know the Admin API version](#get-the-api-version) you want to use.\n\n### Get the API key\n\nTo get the Admin API key:\n\n1. Log in to [Admin Portal](https://admin.pubnub.com/login) as Owner or Account Admin.\n1. Navigate to **Organization Settings** → [**API Management**](https://admin.pubnub.com/service-integrations).\n1. Create a new Service Integration with an initial API Key.\n1. Copy the API Key and store it safely. It is shown only once.\n\nRefer to the [Authentication and authorization](#authentication-and-authorization) section for more information.\n\n### Get the API version\n\nThe Admin API uses two-tier versioning: a major version (v2) in the base URL and a date-based minor version.\n\nYou have two ways to declare which minor version to use:\n\n- **Pin in Admin Portal (recommended)** — Set your version once in the Portal under **Settings** → **API Version**. Every request from your account uses that version automatically. No header needed in your code. This is the preferred approach for long-term integrations because allows you to migrate fully without deployment across all services.\n- **`PubNub-Version` header** — Send `PubNub-Version: YYYY-MM-DD` in individual requests. Useful for initial exploration, testing a newer version before committing to it, or comparing behavior between versions side by side.\n\nWhen both are present, the request header takes precedence over the account pin.\n\nMinor versions use date-based (coordinated universal time, UTC) identifiers in the ISO (International Organization for Standardization) [8601](https://en.wikipedia.org/wiki/ISO_8601) `YYYY-MM-DD` format, for example:\n\n- May 19, 2012 is `2012-05-19`\n- May 29, 2021 is `2021-05-29`\n\nRefer to the [API versioning](#api-versioning) section for more information.\n\n## Example Admin API request\n\nGet the list of all keysets within an account:\n\n```bash\ncurl -X GET https://admin-api.pubnub.com/v2/keysets \\\n  -H \"Authorization: YOUR_API_KEY_HERE\" \\\n  -H \"Content-Type: application/json\"\n```\n\nIf your account does not have a pinned version configured in Admin Portal, include the `PubNub-Version` header:\n\n```bash\ncurl -X GET https://admin-api.pubnub.com/v2/keysets \\\n  -H \"Authorization: YOUR_API_KEY_HERE\" \\\n  -H \"PubNub-Version: 2026-10-14\" \\\n  -H \"Content-Type: application/json\"\n```\n\n### Example response\n\n```json\n{\n  \"keysets\": [\n    {\n      \"id\": \"keyset_abc123\",\n      \"name\": \"My Production Keyset\",\n      \"applicationId\": \"app_123456\",\n      \"type\": \"production\",\n      \"publishKey\": \"pub-c-1234567890abcdef\",\n      \"subscribeKey\": \"sub-c-1234567890abcdef\",\n      \"createdAt\": \"2025-10-27T12:00:00Z\",\n      \"updatedAt\": \"2025-10-27T12:00:00Z\"\n    }\n  ],\n  \"total\": 1,\n  \"page\": 1\n}\n```\n\nFor more information about Admin API endpoints, refer to the [Admin API documentation](https://www.pubnub.com/docs/admin-api).\n\n## Authentication and authorization\n\nAdmin API uses Service Integrations for authentication. A Service Integration is a machine identity that represents a program or service consuming the API. Each Service Integration is scoped to your account and authenticates using API Keys with configurable permissions. All API requests must include the API Key in the `Authorization` header.\n\n### Authentication method\n\nTo authenticate to the Admin API, you need to create a Service Integration. This identity exists only within the scope of your account and has specific permissions assigned to it. Service Integrations authenticate using expirable API Keys that must be included in the `Authorization` header of each request.\n\nWhen creating a Service Integration, you assign permissions that control what operations it can perform. Always follow the principle of least privilege by granting only the permissions that the client actually needs.\n\n### Permissions model\n\nService Integration permissions control access to specific resources and operations within the Admin API. When you create a Service Integration, you select which permissions to grant based on the operations your application needs to perform. For security reasons, you cannot change permissions of an existing Service Integration once it's created.\n\nPermissions are granted as rows that combine:\n\n- a **Level** (Account / App / Keyset)\n- a **PubNub resource** (App / Keyset / Secret key / Usage & Monitoring / OEM Customer)\n- an **Access** option (read, write, or read & write, depending on the resource)\n\n> **Note:** Selecting **Account** as the level doesn't grant full access. You must add a permission row for each resource you want the Service Integration to access. Missing rows for resources result in 403 errors when calling those APIs.\n\n#### Levels\n\nLevels define the hierarchical scope at which permissions apply:\n\n| Level | Scope | Example |\n| :---- | :---- | :------ |\n| Account | All apps and keysets in your account | Read usage metrics for the entire account. |\n| App | A specific app and all its keysets | Manage keysets within a single app. |\n| Keyset | A single keyset | Configure features on one keyset. |\n\nPermissions granted at a higher level automatically apply to all resources below it. For example, granting the read permission to Usage on app level also grants it for all keysets in that app.\n\n#### PubNub resources\n\nPubNub resources define what you can operate on:\n\n| Resource | Description | Notes |\n| :---- | :---- | :------ |\n| App | App management | Create, read, and update apps. |\n| Keyset | Keyset management | Create, read, and update keysets. |\n| Secret key | Secret key of a specific keyset | Manage or rotate a specific secret key. |\n| Usage & Monitoring | Usage metrics | Read usage metrics for the entire account, apps, and keysets. Only supports read permissions. |\n| Illuminate | Illuminate management | Create, read, and update all Illuminate resources |\n| Insights | Account insights | List and view which subscribe keys have the most messages, unique channels and users |\n| OEM Customer | Partner Portal management | List, create, and manage Partner Customers. |\n\n#### Available permissions\n\n| Level | PubNub resource | Access | Description                                                                                                                         |\n| :---- | :---- | :------ |:------------------------------------------------------------------------------------------------------------------------------------|\n| Account | App | Read | List and view all apps details                                                                                                      |\n| Account | App | Read & write | Create, update, rename, and delete apps                                                                                             |\n| Account | Keyset | Read | List and view keyset details and config                                                                                             |\n| Account | Keyset | Read & write | Create, update, and delete keysets across whole account. **Note:** Creating a keyset also requires Secret key - Read permission.    |\n| Account | Secret key | Read | View secret keys across all keysets, return secret key of newly created keyset                                                      |\n| Account | Secret key | Read & write | Rotate secret keys across all keysets                                                                                               |\n| Account | Usage & Monitoring | Read | View usage and monitoring data for whole account                                                                                    |\n| Account | Illuminate | Read | List and view all Illuminate resources and their configurations                                                                     |\n| Account | Illuminate | Read & write | Create, update, and delete all Illuminate resources                                                                                 |\n| Account | Insights | Read | List and view which subscribe keys have the most messages, unique channels and users                                                |\n| Account | OEM Customer | Read | List and view OEM customer data (partner accounts only)                                                                             |\n| Account | OEM Customer | Read & write | Create, update, and delete OEM customer data (partner accounts only)                                                                |\n| App | App | Read | View details for selected app                                                                                                       |\n| App | App | Read & write | Update and delete the selected app                                                                                                  |\n| App | Keyset | Read | List and view keyset details within the selected app                                                                                |\n| App | Keyset | Read & write | Create, update, and delete keysets within the selected app. **Note:** Creating a keyset also requires Secret key - Read permission. |\n| App | Secret key | Read | View secret keys for keysets within the selected app, return secret key of newly created keyset                                     |\n| App | Secret key | Read & write | Rotate secret keys for keysets within the selected app                                                                              |\n| App | Usage & Monitoring | Read | View usage and monitoring data for the selected app                                                                                 |\n| Keyset | Keyset | Read | View selected keyset details and configuration                                                                                      |\n| Keyset | Keyset | Read & write | Update and delete the selected keyset and manage its config                                                                         |\n| Keyset | Secret key | Read | View secret keys for the keyset, return secret key of newly created keyset                                                          |\n| Keyset | Secret key | Read & write | Rotate secret keys for the keyset                                                                                                   |\n| Keyset | Usage & Monitoring | Read | View usage and monitoring data for the keyset                                                                                       |\n\n#### API key permission examples\n\nCheck out the following examples to see how permissions work in practice.\n\n##### Full access for the entire account\n\nThe following permission rows grant full Admin API access for the entire account:\n\n| Level | PubNub resource | Access |\n| :---- | :---- | :------ |\n| Account | App | Read & write |\n| Account | Keyset | Read & write |\n| Account | Secret key | Read & write |\n| Account | Usage & Monitoring | Read |\n| Account | OEM Customer | Read & write (for OEM customers only) |\n\n##### Provision apps and keysets (no usage)\n\n| Level | PubNub resource | Access |\n| :---- | :---- | :------ |\n| Account | App | Read & write |\n| Account | Keyset | Read & write |\n\n##### Read-only access\n\n| Level | PubNub resource | Access |\n| :---- | :---- | :------ |\n| Account | App | Read |\n| Account | Keyset | Read |\n| Account | Usage & Monitoring | Read |\n\n##### Narrowly scoped to one app\n\nThe following permission rows grant access to one app and all its keysets:\n\n| Level | PubNub resource | Access |\n| :---- | :---- | :------ |\n| App | App ID | Read & write |\n| App | Keyset ID | Read & write |\n\n### Admin API credentials lifecycle\n\nAPI Keys have a maximum time to live of 1 year, after which they expire. You can configure shorter expiration periods.\n\n### Admin API key rotation\n\nYou can issue multiple API Keys per Service Integration for zero-downtime rotation. Create a new key, update your applications, then revoke the old key.\n\n### Admin API key revocation\n\n- We recommend revoking old API Keys once rotation is complete, even if they haven't expired yet\n- Revoked keys are immediately invalidated\n\n### Security best practices\n\nWhen working with the Admin API:\n\n- Store API keys in a secrets manager or use environment variables—never commit credentials to version control\n- Use HTTPS only\n- Rotate credentials regularly, minimum once per year, or more frequently for sensitive operations\n- Limit credential scope by following the principle of least privilege when assigning permissions\n- Monitor credential usage in the Admin UI\n- Revoke unused keys\n\n## Requests structure\n\nYou should make all Admin API requests to the base URL `https://admin-api.pubnub.com/v2`.\n\n### Example endpoint construction\n\nTo access a specific resource, append the resource path to the base URL `https://admin-api.pubnub.com/v2/{resource-path}`, for example:\n\n```bash\nhttps://admin-api.pubnub.com/v2/keysets/12345/config\n```\n\n## Request format\n\nThe Admin API uses standard HTTP methods to perform operations:\n\n| Method   | Purpose                    | Typical Use                |\n| :------- | :------------------------- | :------------------------- |\n| `GET`    | Retrieve resources         | Fetch data, list resources |\n| `POST`   | Create resources           | Create new entities        |\n| `PUT`    | Update/replace resources   | Full resource updates      |\n| `PATCH`  | Partially update resources | Partial resource updates   |\n| `DELETE` | Remove resources           | Delete entities            |\n\n### Required headers\n\nYou must add these headers to every Admin API request:\n\n```bash\n-H \"Authorization: YOUR_API_KEY_HERE\" \\\n-H \"Content-Type: application/json\"\n```\n\nIf your account does not have a pinned version set in Admin Portal, also include:\n\n```bash\n-H \"PubNub-Version: 2026-10-14\"\n```\n\n### Request body format\n\nFor requests that include a body (`POST`, `PUT`, `PATCH`), use JSON (JavaScript Object Notation) format:\n\n```bash\ncurl -X POST https://admin-api.pubnub.com/v2/keysets \\\n  -H \"Authorization: YOUR_API_KEY_HERE\" \\\n  -H \"PubNub-Version: 2026-10-14\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"production-keyset\",\n    \"region\": \"us-east-1\"\n  }'\n```\n\n## API versioning\n\nThe Admin API uses a two-tier versioning strategy that combines major versions in the URL with date-based minor versions in headers. This approach provides stability for existing integrations while enabling continuous feature evolution.\n\n### Major versions (v1, v2, v3)\n\nThe major version appears in the base URL and represents fundamental architectural changes:\n\n```bash\nhttps://admin-api.pubnub.com/v2\n```\n\nAdmin API is currently on major version 2 (v2).\n\nMajor version changes happen every few years and may include breaking changes. When we increment the major version (v2→v3), it signals that the way you interact with the API has changed.\n\n### Minor versions (date-based)\n\nMinor versions use date-based identifiers (e.g., `2024-11-15`) and provide temporal context. `2024-11-15` means the Admin API as it existed on November 15, 2024. Within those minor versions updates may happen and may include:\n\n- removing or renaming an endpoint, field, or enum value\n- making an optional request field required, or narrowing the values a field accepts\n- changing the type or meaning of an existing field\n- changing status codes, error shapes, or the observable behavior of an existing operation\n\n### Declaring your API version\n\nYou have two ways to tell the API which minor version to use.\n\n1. Pin in Admin Portal (recommended for long-term integrations)\n\nNavigate to **Settings** → **API Management** → **Pinned PubNub Admin API version** in Admin Portal and select a version. The gateway applies it to every request from your account automatically — no header needed in your code.\n\nPinning is the preferred approach when you maintain multiple services or teams that all use the API. Migrating to a new version becomes a single change in one place rather than a coordinated deployment across all callers.\n\n2. `PubNub-Version` header (useful for testing and migration)\n\nSend the header in individual requests:\n\n```bash\nPubNub-Version: 2026-10-14\n```\n\nUse the header when:\n\n- Exploring the API or setting up a new integration before committing to a version\n- Testing how a newer version handles your requests without changing the account-wide pin\n- Running requests for two different versions side by side to compare behavior\n- Your different integrations require different versions\n\nWhen the header is present, it overrides the account pin for that request.\n\n### Additive changes ship without a new version\n\nWe add capabilities to minor versions that are already published. The following changes can appear at any time in the version you already use, and don't get a new date:\n\n- new endpoints\n- new fields in responses\n- new optional fields in requests\n- bug fixes\n\nTo stay compatible, make sure your integration:\n\n- ignores response fields it doesn't recognize instead of failing validation\n- doesn't depend on an endpoint or a field being absent\n\n## API version lifecycle\n\nMinor versions go through a lifecycle based on their date. You don't need to do anything until you start receiving warning headers — at that point you have a year to migrate before enforcement begins.\n\n### Lifecycle states\n\n| State | When | What happens |\n| :---- | :---- | :---- |\n| **Active** | Requested date < 1 year old | Normal responses, no lifecycle headers, version supported |\n| **Deprecated** | Requested date 1–2 years old | Requests succeed with `Deprecation` and `Sunset` headers in the response, support ends. Plan your migration |\n| **End-of-life** | Requested date ≥ 2 years old | All requests return `410 Gone` |\n\n### Warning headers\n\nWhen your requested version enters the deprecated window, every response includes:\n\n```\nDeprecation: Tue, 01 Jul 2026 00:00:00 GMT\nSunset: Wed, 01 Jul 2027 00:00:00 GMT\n```\n\n| Header | Meaning |\n| :----- | :------ |\n| `Deprecation` | The date your requested version became deprecated |\n| `Sunset` | The date your requested version stops working entirely |\n\n### How to migrate?\n\nIf there are no breaking changes to the functionality you use, you can update the pin immediately without any code changes.\n\nIf there are breaking changes to the functionality us use, follow this procedure:\n\n1. Read changelog for breaking changes between your current version and the version you want to move to.\n1. Update your services for any breaking changes.\n1. Test your changes using `Pubnub-Version` header\n1. Deploy.\n1. Navigate to **Settings** → **API Version** in Admin Portal and select the new version.\n1. You can now clear the `Pubnub-Version` header from your requests.\n\nIf there are no breaking changes, you can update the pin immediately without any code changes.\n\n## Rate limits & quotas\n\nTo ensure service stability and fair usage, the Admin API enforces rate limits on requests. Currently the limit is 120 requests per minute (60 second window). Contact our [support](mailto:support@pubnub.com) if you want to increase the limit.\n\nWhen you exceed rate limits, the Admin API returns the `HTTP 429 Too Many Requests` status code.\n\n### Rate limit headers\n\nThe Admin API includes rate limit information in response headers:\n\n```bash\nX-RateLimit-Limit: 120\nX-RateLimit-Remaining: 117\nX-RateLimit-Reset: 46\n```\n\n| Header                  | Description                                                         |\n| :---------------------- | :------------------------------------------------------------------ |\n| `X-RateLimit-Limit`     | The total number of requests allowed per minute.                    |\n| `X-RateLimit-Remaining` | The number of requests still available in the current time window.  |\n| `X-RateLimit-Reset`     | The number of seconds remaining until the rate limit counter resets. |\n"},"servers":[{"url":"https://admin-api.pubnub.com"}],"security":[{"API-Key":[]}],"components":{"schemas":{"TimeDiffParams":{"type":"object","properties":{"startSource":{"enum":["DATA_FIELD","PUBLISH_TIMETOKEN"],"type":"string","description":"Start source for time difference calculation: DATA_FIELD or PUBLISH_TIMETOKEN. DATA_FIELD accepts only TIMESTAMP data type."},"startFieldIndex":{"type":"number","description":"Index or position of the start timestamp data field in your array. Not required if startSource is PUBLISH_TIMETOKEN."},"endSource":{"enum":["DATA_FIELD","PUBLISH_TIMETOKEN"],"type":"string","description":"End source for time difference calculation: DATA_FIELD or PUBLISH_TIMETOKEN."},"endFieldIndex":{"type":"number","description":"Index or position of the end timestamp data field in your array. Not required if endSource is PUBLISH_TIMETOKEN."}},"required":["startSource","endSource"]},"DerivationDto":{"type":"object","properties":{"operation":{"type":"string","enum":["TIME_DIFF"],"description":"Derivation operation type. Currently only TIME_DIFF is supported."},"params":{"description":"Parameters for the derivation calculation.","allOf":[{"$ref":"#/components/schemas/TimeDiffParams"}]}},"required":["operation","params"]},"FieldDto":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the field. Omit when creating new fields; the API auto-generates IDs. Required when creating metrics and decisions. Used as measureId, dimensionIds, or inputFields[].sourceId.","example":"b20214f9-0677-4e65-a60b-b12a13200000"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Field name (1-50 characters).","example":"Event Type"},"source":{"enum":["JSONPATH","DERIVED"],"type":"string","description":"Field source type: JSONPATH or DERIVED.","example":"JSONPATH"},"jsonPath":{"type":"string","maxLength":200,"description":"JSON path expression for extracting data (max 200 chars). Required when source is JSONPATH and isActive is true. Example: $.message.body.event_type extracts the event_type from the message payload.","example":"$.message.body.event_type"},"jsonFieldType":{"enum":["TEXT","TEXT_LONG","NUMERIC","TIMESTAMP","DURATION_SECONDS"],"type":"string","description":"Field data type: TEXT, TEXT_LONG (character limit is 1000, limited to 5 per Business Object), NUMERIC, or TIMESTAMP. Required when source is JSONPATH. Timestamp format: ISO 8601 (e.g., 2025-08-21T19:27:01Z).","example":"TEXT"},"isKeyset":{"type":"boolean","description":"Boolean flag indicating if this field is part of the keyset. Informational only; included in responses."},"derivation":{"description":"Derivation configuration. Required when source is DERIVED.","allOf":[{"$ref":"#/components/schemas/DerivationDto"}]}},"required":["name"]},"BusinessObjectDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Business object name (1-50 characters).","example":"Event Tracker"},"isActive":{"type":"boolean","description":"Whether to start capturing data (default: false). At least one subscribe key must be specified in the subkeys array to activate.","default":false,"example":false},"description":{"type":"string","maxLength":200,"description":"Description (max 200 characters).","example":"Tracks event data from the application"},"fields":{"description":"Data fields for the business object (max 100).","type":"array","items":{"$ref":"#/components/schemas/FieldDto"}},"subkeys":{"minItems":1,"description":"PubNub subscribe keys to capture data from (min 0, max 10). Optional during setup, but at least one subscribe key must be specified to activate the Business Object.","example":["sub-c-1709195a-916f-4650-93f2-6f27ec000000"],"type":"array","items":{"type":"string"}},"customerIds":{"maxItems":1,"description":"Your unique customer IDs (max 1, requires Partner Portal).","type":"array","items":{"type":"string"}}},"required":["name","subkeys"]},"Derivation":{"type":"object","properties":{"operation":{"type":"string","enum":["TIME_DIFF"],"description":"Derivation operation type. Currently only TIME_DIFF is supported."},"params":{"description":"Parameters for the derivation calculation.","allOf":[{"$ref":"#/components/schemas/TimeDiffParams"}]}},"required":["operation","params"]},"BusinessObjectField":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the field. Omit when creating new fields; the API auto-generates IDs. Required when creating metrics and decisions. Used as measureId, dimensionIds, or inputFields[].sourceId."},"name":{"type":"string","description":"Field name (1-50 characters)."},"jsonPath":{"type":"string","description":"JSON path expression for extracting data (max 200 chars). Required when source is JSONPATH and isActive is true. Example: $.message.body.event_type extracts the event_type from the message payload."},"jsonFieldType":{"enum":["TEXT","TEXT_LONG","NUMERIC","TIMESTAMP","DURATION_SECONDS"],"type":"string","description":"Field data type: TEXT, TEXT_LONG (character limit is 1000, limited to 5 per Business Object), NUMERIC, or TIMESTAMP. Required when source is JSONPATH. Timestamp format: ISO 8601 (e.g., 2025-08-21T19:27:01Z)."},"isKeyset":{"type":"boolean","description":"Boolean flag indicating if this field is part of the keyset. Informational only; included in responses."},"source":{"enum":["JSONPATH","DERIVED"],"type":"string","description":"Field source type: JSONPATH or DERIVED."},"derivation":{"description":"Derivation configuration. Required when source is DERIVED.","allOf":[{"$ref":"#/components/schemas/Derivation"}]}},"required":["id","name","jsonFieldType","isKeyset","source"]},"MetricFilter":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated ID for the metric filter. Omit when creating; required when updating a metric (PUT)."},"sourceType":{"type":"string","description":"Filter source type. Value must always be DIMENSION.","enum":["MEASURE","DIMENSION"]},"sourceId":{"type":"string","description":"ID of the field or data field to filter on. References a TEXT field from the business object."},"operation":{"type":"string","description":"Filter operation: STRING_EQUALS, STRING_NOT_EQUAL, STRING_CONTAINS, STRING_NOT_CONTAINS, STRING_IS_EMPTY, STRING_IS_NOT_EMPTY, STRING_STARTS_WITH, STRING_ENDS_WITH.","enum":["NUMERIC_GREATER_THAN","NUMERIC_GREATER_THAN_EQUALS","NUMERIC_LESS_THAN","NUMERIC_LESS_THAN_EQUALS","NUMERIC_INCLUSIVE_BETWEEN","NUMERIC_EXCLUSIVE_NOT_BETWEEN","BOOLEAN_IS_TRUE","BOOLEAN_IS_FALSE","STRING_CONTAINS","STRING_NOT_CONTAINS","STRING_STARTS_WITH","STRING_ENDS_WITH","STRING_EQUALS","STRING_IS_EMPTY","STRING_IS_NOT_EMPTY","STRING_NOT_EQUALS"]},"arguments":{"description":"Filter arguments (1 string). Matching is case-sensitive.","type":"array","items":{"type":"string"}}},"required":["id","sourceType","sourceId","operation","arguments"]},"DecisionInputField":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the input field. Omit when creating. Required when creating or updating rules (referenced as inputFieldId in rule inputValues)."},"sourceType":{"type":"object","description":"Source type for the input field. Use FIELD for BUSINESSOBJECT decisions. For METRIC decisions, this is auto-populated from the metric. For QUERY decisions, this is auto-populated as QUERYFIELD."},"sourceId":{"type":"string","description":"ID of metric field/dimension to use as input or condition. References a field from the business object."},"name":{"type":"string","description":"Label for the input field (1-50 characters)."}},"required":["sourceId","name"]},"DecisionOutputField":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the output field. Omit when creating."},"name":{"type":"string","description":"Label of the custom variable in the rules table (1-50 characters)."},"variable":{"type":"string","description":"Name of the custom variable used in action templates (1-50 characters). Reference in templates as ${variable_name}."}},"required":["name","variable"]},"DecisionInputValue":{"type":"object","properties":{"operation":{"enum":["NUMERIC_EQUALS","NUMERIC_NOT_EQUALS","NUMERIC_GREATER_THAN","NUMERIC_GREATER_THAN_EQUALS","NUMERIC_LESS_THAN","NUMERIC_LESS_THAN_EQUALS","NUMERIC_INCLUSIVE_BETWEEN","STRING_EQUALS","STRING_NOT_EQUALS","STRING_CONTAINS","STRING_NOT_CONTAINS","STRING_STARTS_WITH","STRING_NOT_STARTS_WITH","STRING_ENDS_WITH","STRING_NOT_ENDS_WITH","TIME_SINCE_GREATER_THAN","TIME_SINCE_GREATER_THAN_EQUALS","TIME_SINCE_LESS_THAN","TIME_SINCE_LESS_THAN_EQUALS","TIME_SINCE_EQUALS","TIME_SINCE_NOT_EQUALS","TIME_SINCE_INCLUSIVE_BETWEEN","TIME_UNTIL_GREATER_THAN","TIME_UNTIL_GREATER_THAN_EQUALS","TIME_UNTIL_LESS_THAN","TIME_UNTIL_LESS_THAN_EQUALS","TIME_UNTIL_EQUALS","TIME_UNTIL_NOT_EQUALS","TIME_UNTIL_INCLUSIVE_BETWEEN","ANY"],"type":"string","description":"Condition operation: ANY, NUMERIC_EQUALS, NUMERIC_NOT_EQUALS, NUMERIC_GREATER_THAN, NUMERIC_GREATER_THAN_EQUALS, NUMERIC_LESS_THAN, NUMERIC_LESS_THAN_EQUALS, NUMERIC_INCLUSIVE_BETWEEN, STRING_EQUALS, STRING_NOT_EQUALS, STRING_CONTAINS."},"argument":{"type":"string","description":"Condition argument (max 92 characters). Empty string if operation is ANY. For NUMERIC_INCLUSIVE_BETWEEN, separate numbers by comma (e.g., \"2,7\")."}},"required":["operation"]},"DecisionOutputValue":{"type":"object","properties":{"value":{"type":"string","description":"Value that your custom variable will send in actions (max 200 characters)."}},"required":["value"]},"ActionValue":{"type":"object","properties":{"status":{"type":"boolean","description":"Whether action is active for this rule (true = execute when conditions satisfied, false = do not execute)."},"executionLimitType":{"type":"string","description":"How often to execute when conditions satisfied. Options: ALWAYS (default), ONCE_PER_INTERVAL, ONCE_PER_INTERVAL_PER_CONDITION, ONCE_PER_INTERVAL_PER_CONDITION_GROUP.","enum":["ALWAYS","ONCE","ONCE_PER_INTERVAL","ONCE_PER_CONDITION_GROUP","ONCE_PER_INTERVAL_PER_CONDITION_GROUP"]},"executionLimitIntervalInSeconds":{"type":"number","description":"Execution interval in seconds: 60, 300, 600, 900, 1800, 3600, 86400. Required if executionLimitType is ONCE_PER_INTERVAL or ONCE_PER_INTERVAL_PER_CONDITION."},"executionLimitInputFieldIds":{"description":"Field IDs for execution limits. Required if executionLimitType is ONCE_PER_INTERVAL_PER_CONDITION.","type":"array","items":{"type":"string"}},"resetLimits":{"type":"boolean","description":"When true, resets accumulated execution limits for this action when updating rules."}},"required":["status"]},"DecisionRule":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the rule. Required for updating rules directly."},"inputValues":{"description":"List of conditions to evaluate.","type":"array","items":{"$ref":"#/components/schemas/DecisionInputValue"}},"outputValues":{"description":"Values to assign to outputs when conditions match.","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputValue"}},"actionValues":{"description":"Actions to trigger when conditions match.","type":"array","items":{"$ref":"#/components/schemas/ActionValue"}}},"required":["inputValues","outputValues","actionValues"]},"Action":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the action. Omit when creating. Required when referencing an action in rules (as actionId in actionValues)."},"actionType":{"type":"string","description":"Action type: PUBNUB_PUBLISH, WEBHOOK_EXECUTION, APPCONTEXT_SET_USER_METADATA, APPCONTEXT_SET_CHANNEL_METADATA, APPCONTEXT_SET_MEMBERSHIP_METADATA.","enum":["WEBHOOK_EXECUTION","PUBNUB_PUBLISH","APPCONTEXT_SET_USER_METADATA","APPCONTEXT_SET_CHANNEL_METADATA","APPCONTEXT_SET_MEMBERSHIP_METADATA"]},"description":{"type":"string","description":"Optional description of the action (max 200 characters)."},"name":{"type":"string","description":"Name for the action (1-50 characters)."},"template":{"type":"object","description":"Action template structure. Format depends on actionType. Supports variables like ${inputFieldId} or ${outputVariable} to insert dynamic values."},"note":{"type":"string","description":"Additional notes (max 2,048 characters)."}},"required":["name"]},"Customer":{"type":"object","properties":{"id":{"type":"string","description":"Your unique customer ID for OEM partners (requires Partner Portal)."},"name":{"type":"string","description":"Customer name."}},"required":["id","name"]},"RelativeTimeDto":{"type":"object","properties":{"direction":{"enum":["past","future"],"type":"string","description":"Direction: past or future.","example":"past"},"value":{"type":"number","minimum":1,"description":"Quantity of the time unit.","example":1},"unit":{"enum":["seconds","minutes","hours","days","weeks","months"],"type":"string","description":"Time unit: seconds, minutes, hours, days, weeks, months.","example":"hours"}},"required":["direction","value","unit"]},"AbsoluteTimeDto":{"type":"object","properties":{"start":{"type":"string","description":"ISO 8601 start timestamp.","example":"2025-10-01T00:00:00Z"},"end":{"type":"string","description":"ISO 8601 end timestamp.","example":"2025-10-31T23:59:59Z"}},"required":["start","end"]},"TimeRangeDto":{"type":"object","properties":{"field":{"type":"string","description":"Timestamp field used for filtering (e.g., eventTimestamp).","example":"timestamp"},"relative":{"description":"Relative time window (preferred for sliding windows). Only one of relative or absolute may be specified.","allOf":[{"$ref":"#/components/schemas/RelativeTimeDto"}]},"absolute":{"description":"Absolute time window (ISO-8601 start/end). Only one of relative or absolute may be specified.","allOf":[{"$ref":"#/components/schemas/AbsoluteTimeDto"}]}},"required":["field"]},"FilterDto":{"type":"object","properties":{"field":{"type":"string","description":"Field to filter on (alias or name).","example":"event_count"},"operator":{"enum":["=","!=",">","<",">=","<=","in","notIn","like","between","notBetween","isNull","isNotNull","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty","minLength","maxLength"],"type":"string","description":"Filter operator: =, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength.","example":">"},"value":{"type":"object","description":"Comparison value (type is operator-dependent).","example":1}},"required":["field","operator"]},"SourceDto":{"type":"object","properties":{"id":{"type":"string","maxLength":128,"pattern":"IDENTIFIER_PATTERN","description":"Identifier for this source within the pipeline (used by transforms and output).","example":"events_source"},"type":{"enum":["businessObject","reference"],"type":"string","description":"Source type: businessObject or reference.","example":"businessObject"},"businessObjectId":{"type":"string","description":"Required when type is businessObject. ID of the business object to query.","example":"19b9c407-6269-44a4-a5ec-d581dbb0test"},"referenceId":{"type":"string","description":"Required when type is reference."},"timeRange":{"description":"Time filter applied to the source.","allOf":[{"$ref":"#/components/schemas/TimeRangeDto"}]},"filters":{"description":"Source-level filters applied before transforms.","type":"array","items":{"$ref":"#/components/schemas/FilterDto"}},"fields":{"minItems":1,"description":"Fields selected from the source.","type":"array","items":{"$ref":"#/components/schemas/FieldDto"}}},"required":["id","type","fields"]},"AggregationDto":{"type":"object","properties":{"function":{"enum":["sum","count","avg","min","max","countDistinct","stddev","percentile","groupArray","groupUniqArray","any"],"type":"string","description":"Aggregation function: count, sum, avg, min, max, countDistinct, stddev, percentile, groupArray, groupUniqArray, any.","example":"count"},"field":{"type":"string","description":"Field to aggregate (alias or field name). Use * for count when no specific field is needed.","example":"*"},"alias":{"type":"string","description":"Output field name for the aggregation.","example":"event_count"},"parameter":{"type":"number","description":"Optional parameter for advanced aggregations (e.g., percentile value)."}},"required":["function","field","alias"]},"OrderByDto":{"type":"object","properties":{"field":{"type":"string","description":"Field to sort by.","example":"event_count"},"direction":{"enum":["ASC","DESC"],"type":"string","description":"Sort direction: ASC or DESC.","example":"DESC"}},"required":["field"]},"CollectFieldDto":{"type":"object","properties":{"field":{"type":"string"},"function":{"type":"string","enum":["groupArray","groupUniqArray"]},"alias":{"type":"string"},"limit":{"type":"number","minimum":1},"orderBy":{"$ref":"#/components/schemas/OrderByDto"}},"required":["field","function","alias"]},"AggregateTransformDto":{"type":"object","properties":{"groupBy":{"description":"Fields (aliases) to group by.","example":["user","event_type"],"type":"array","items":{"type":"string"}},"aggregations":{"description":"Aggregation functions to produce output (count, sum, avg, min, max, countDistinct, etc.).","type":"array","items":{"$ref":"#/components/schemas/AggregationDto"}},"collectFields":{"description":"Optional collection/array aggregations (e.g., groupUniqArray).","type":"array","items":{"$ref":"#/components/schemas/CollectFieldDto"}}},"required":["groupBy","aggregations"]},"WindowFunctionDto":{"type":"object","properties":{"function":{"type":"string","enum":["rowNumber","rank","denseRank","percentRank","lag","lead","firstValue","lastValue","sumOver","avgOver"]},"partitionBy":{"type":"array","items":{"type":"string"}},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/OrderByDto"}},"alias":{"type":"string"},"offset":{"type":"number"}},"required":["function","partitionBy","orderBy","alias"]},"WindowTransformDto":{"type":"object","properties":{"functions":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/WindowFunctionDto"}}},"required":["functions"]},"JoinConditionDto":{"type":"object","properties":{"left":{"type":"string"},"operator":{"type":"string","enum":["=","!=",">","<",">=","<="]},"right":{"type":"string"}},"required":["left","operator","right"]},"JoinDto":{"type":"object","properties":{"with":{"type":"string","maxLength":128,"pattern":"IDENTIFIER_PATTERN"},"type":{"type":"string","enum":["inner","left","right","full"]},"on":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/JoinConditionDto"}}},"required":["with","type","on"]},"DedupeDto":{"type":"object","properties":{"partitionBy":{"minItems":1,"type":"array","items":{"type":"string"}},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/OrderByDto"}},"keep":{"type":"string","enum":["first","last"]}},"required":["partitionBy","orderBy","keep"]},"CalculateExpressionDto":{"type":"object","properties":{"expression":{"type":"object"},"alias":{"type":"string","maxLength":128,"pattern":"IDENTIFIER_PATTERN"},"type":{"type":"string","enum":["dimension","measure"]}},"required":["expression","alias","type"]},"CalculateDto":{"type":"object","properties":{"expressions":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/CalculateExpressionDto"}}},"required":["expressions"]},"UnnestTransformDto":{"type":"object","properties":{"arrayField":{"type":"string","description":"Name or alias of the array field to unnest.","example":"channels"},"alias":{"type":"string","description":"Alias for the unnested value in the output.","example":"channel"}},"required":["arrayField"]},"FilterJoinTransformDto":{"type":"object","properties":{"criteriaAggregate":{"$ref":"#/components/schemas/AggregateTransformDto"},"criteriaFilters":{"type":"array","items":{"$ref":"#/components/schemas/FilterDto"}},"joinFields":{"type":"array","items":{"type":"string"}}},"required":["criteriaAggregate","joinFields"]},"TransformDto":{"type":"object","properties":{"id":{"type":"string","maxLength":128,"pattern":"IDENTIFIER_PATTERN","description":"Identifier for the transform step (referenced by later stages).","example":"event_aggregation"},"type":{"enum":["aggregate","window","join","dedupe","calculate","unnest","filter_join"],"type":"string","description":"Transform type: aggregate, window, join, dedupe, calculate, unnest, filter_join.","example":"aggregate"},"input":{"type":"string","maxLength":128,"pattern":"IDENTIFIER_PATTERN","description":"ID of the source or previous transform.","example":"events_source"},"aggregate":{"description":"Aggregation configuration. Present when type is aggregate.","allOf":[{"$ref":"#/components/schemas/AggregateTransformDto"}]},"window":{"description":"Window transform configuration. Present when type is window.","allOf":[{"$ref":"#/components/schemas/WindowTransformDto"}]},"join":{"description":"Join transform configuration. Present when type is join.","allOf":[{"$ref":"#/components/schemas/JoinDto"}]},"dedupe":{"description":"Dedupe transform configuration. Present when type is dedupe.","allOf":[{"$ref":"#/components/schemas/DedupeDto"}]},"calculate":{"description":"Calculate transform configuration. Present when type is calculate.","allOf":[{"$ref":"#/components/schemas/CalculateDto"}]},"unnest":{"description":"Unnest configuration for expanding array fields into rows. Present when type is unnest.","allOf":[{"$ref":"#/components/schemas/UnnestTransformDto"}]},"filter_join":{"description":"Filter join transform configuration. Present when type is filter_join.","allOf":[{"$ref":"#/components/schemas/FilterJoinTransformDto"}]},"filters":{"description":"Filters applied after the transform step.","type":"array","items":{"$ref":"#/components/schemas/FilterDto"}}},"required":["id","type","input"]},"OutputSelectDto":{"type":"object","properties":{"field":{"type":"string","description":"Field name or alias to return.","example":"event_type"},"alias":{"type":"string","description":"Optional output alias."},"id":{"type":"string","description":"Optional selection identifier (v2.0)."}},"required":["field"]},"OutputDto":{"type":"object","properties":{"from":{"type":"string","maxLength":128,"pattern":"IDENTIFIER_PATTERN","description":"ID of the source or transform to output from.","example":"event_aggregation"},"select":{"minItems":1,"description":"Fields to include in the output.","type":"array","items":{"$ref":"#/components/schemas/OutputSelectDto"}},"orderBy":{"description":"Output sorting configuration.","type":"array","items":{"$ref":"#/components/schemas/OrderByDto"}},"limit":{"type":"number","minimum":1,"maximum":500,"description":"Maximum number of results (1-500).","example":100},"offset":{"type":"number","minimum":0,"description":"Pagination offset (>= 0).","example":0}},"required":["from","select"]},"PipelineDto":{"type":"object","properties":{"sources":{"minItems":1,"description":"One or more data sources. At least one source is required.","type":"array","items":{"$ref":"#/components/schemas/SourceDto"}},"transforms":{"description":"Optional transformation steps (aggregate, window, join, dedupe, calculate, unnest, filter_join). Each transform references a source or previous transform by id.","type":"array","items":{"$ref":"#/components/schemas/TransformDto"}},"output":{"description":"Output configuration: which stage to return and what fields to include.","allOf":[{"$ref":"#/components/schemas/OutputDto"}]}},"required":["sources","output"]},"QueryRequestDto":{"type":"object","properties":{"version":{"type":"string","description":"Version identifier for the query definition format. Use \"2.0\" for the current format.","example":"2.0"},"pipeline":{"description":"Query pipeline definition containing sources, transforms, and output.","allOf":[{"$ref":"#/components/schemas/PipelineDto"}]},"meta":{"type":"object","description":"Optional metadata (preview flags, template info, etc.)."}},"required":["version","pipeline"]},"Query":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}},"customer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Customer"}]},"businessObjects":{"type":"array","items":{"$ref":"#/components/schemas/BusinessObject"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"definition":{"$ref":"#/components/schemas/QueryRequestDto"},"template":{"type":"string"},"accountId":{"type":"string"}},"required":["id","name","definition","accountId"]},"Decision":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"id":{"type":"string","description":"PubNub-generated unique ID for the decision. Omit when creating. Required in later requests to update, delete, or retrieve this decision."},"name":{"type":"string","description":"Decision name (1-50 characters)."},"description":{"type":"string","description":"Description (max 200 characters)."},"accountId":{"type":"string","description":"Your PubNub account ID."},"businessObjectId":{"type":"string","description":"ID of the associated business object."},"sourceType":{"type":"string","description":"Decision source type: BUSINESSOBJECT, METRIC, or QUERY. METRIC evaluates an aggregated metric value. BUSINESSOBJECT evaluates each event in real time. QUERY evaluates rows from a saved query.","enum":["BUSINESSOBJECT","METRIC","QUERY"]},"sourceId":{"type":"string","description":"ID of the metric, business object, or query used as the data source. If sourceType is METRIC, provide the metric ID. If sourceType is BUSINESSOBJECT, provide the business object ID. If sourceType is QUERY, provide the query ID."},"hitType":{"type":"string","description":"Rule matching behavior: SINGLE (stop at first match) or MULTIPLE (evaluate all rules).","enum":["SINGLE","MULTI"]},"enabled":{"type":"boolean","description":"Whether decision is active (default: false). Must be false when creating a decision. Active decisions cannot have their inputFields, outputFields, or actions modified."},"activeFrom":{"format":"date-time","type":"string","description":"Start date/time for activation (ISO 8601, UTC)."},"activeUntil":{"format":"date-time","type":"string","description":"End date/time for deactivation (ISO 8601, UTC)."},"executeOnce":{"type":"boolean","description":"Execute actions only once when conditions are satisfied for the first time."},"executionFrequency":{"type":"number","description":"Evaluation frequency in seconds. Allowed values: 60, 300, 600, 900, 1800, 3600, 86400."},"inputFields":{"description":"Input fields for decision conditions. Required if sourceType is BUSINESSOBJECT (provide sourceType=\"FIELD\" and sourceId referencing a business object field). For METRIC decisions, input fields are auto-populated from the metric's measure and dimensions. For QUERY decisions, input fields are auto-populated from the query output fields (sourceType=\"QUERYFIELD\").","type":"array","items":{"$ref":"#/components/schemas/DecisionInputField"}},"outputFields":{"description":"Custom variables for use in actions. Define a name (display label) and variable (reference name for action templates).","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputField"}},"rules":{"description":"Decision rules containing conditions and actions. Rules reference auto-generated IDs from inputFields, outputFields, and actions. Add rules in a separate PUT request after the decision is created.","type":"array","items":{"$ref":"#/components/schemas/DecisionRule"}},"actions":{"description":"Available actions for rules to execute.","type":"array","items":{"$ref":"#/components/schemas/Action"}},"businessObject":{"description":"Associated business object details.","allOf":[{"$ref":"#/components/schemas/BusinessObject"}]},"metric":{"description":"Associated metric details.","allOf":[{"$ref":"#/components/schemas/Metric"}]},"query":{"description":"Associated query details.","allOf":[{"$ref":"#/components/schemas/Query"}]},"customer":{"nullable":true,"description":"Associated OEM customer for this decision.","allOf":[{"$ref":"#/components/schemas/Customer"}]}},"required":["id","name","accountId","hitType","enabled","executeOnce"]},"Chart":{"type":"object","properties":{"id":{"type":"string","example":"access_manager_by_metric"},"series":{"type":"array","items":{"$ref":"#/components/schemas/UsageSeriesResponse"}}},"required":["id","series"]},"Dashboard":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"id":{"type":"string","description":"PubNub-generated unique ID for the dashboard. Omit when creating. Required in later requests to update, delete, or retrieve the dashboard."},"name":{"type":"string","description":"Dashboard title (max 50 characters)."},"accountId":{"type":"string","description":"Your PubNub account ID."},"dateRange":{"enum":["30 minutes","1 hour","24 hours","3 days","1 week","30 days","3 months","Custom date"],"type":"string","description":"Date range for dashboard data: 30 minutes, 1 hour, 24 hours, 3 days, 1 week, 30 days, 3 months, or Custom date."},"startDate":{"format":"date-time","type":"string","description":"Custom start date/time (ISO 8601). Required when dateRange is Custom date."},"endDate":{"format":"date-time","type":"string","description":"Custom end date/time (ISO 8601). Required when dateRange is Custom date."},"charts":{"description":"List of charts to display on the dashboard.","type":"array","items":{"$ref":"#/components/schemas/Chart"}},"customer":{"nullable":true,"description":"Associated OEM customer for this dashboard.","allOf":[{"$ref":"#/components/schemas/Customer"}]}},"required":["id","name","accountId","dateRange","charts"]},"BusinessObject":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"id":{"type":"string","description":"PubNub-generated unique ID for the Business Object. Required in later requests for GET, UPDATE, and DELETE methods."},"name":{"type":"string","description":"Business object name (1-50 characters)."},"isActive":{"type":"boolean","description":"Whether to start capturing data (default: false). At least one subscribe key must be specified in the subkeys array to activate."},"description":{"type":"string","description":"Description (max 200 characters)."},"fields":{"description":"Data fields for the business object (max 100).","type":"array","items":{"$ref":"#/components/schemas/BusinessObjectField"}},"accountId":{"type":"string","description":"Your PubNub account ID."},"subkeys":{"description":"PubNub subscribe keys to capture data from (min 0, max 10). Optional during setup, but at least one subscribe key must be specified to activate the Business Object.","type":"array","items":{"type":"string"}},"metrics":{"description":"Associated metrics for this business object.","type":"array","items":{"$ref":"#/components/schemas/Metric"}},"decisions":{"description":"Associated decisions for this business object.","type":"array","items":{"$ref":"#/components/schemas/Decision"}},"dashboards":{"description":"Associated dashboards for this business object.","type":"array","items":{"$ref":"#/components/schemas/Dashboard"}},"queries":{"description":"Associated queries for this business object.","type":"array","items":{"$ref":"#/components/schemas/Query"}},"customers":{"description":"Associated OEM customers for this business object.","type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","name","isActive","accountId","subkeys"]},"Metric":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the metric. Omit when creating; the API auto-generates the ID. Required in later requests to update, delete, or retrieve the metric."},"name":{"type":"string","description":"Metric name (1-50 characters)."},"measureId":{"type":"string","description":"Field ID to aggregate. Required for AVG, MAX, MIN, SUM functions -- references a NUMERIC field from the business object. Must be omitted for COUNT and COUNT_DISTINCT functions."},"businessObjectId":{"type":"string","description":"ID of the source business object. Use the id returned from creating or listing business objects."},"evaluationWindow":{"type":"number","description":"Time period in seconds for metric evaluation. Allowed values: 60 (1 min), 300 (5 min), 600 (10 min), 900 (15 min), 1800 (30 min), 3600 (1 hour), 86400 (1 day)."},"function":{"type":"string","description":"Aggregation function: AVG, COUNT, COUNT_DISTINCT, MAX, MIN, or SUM. COUNT and COUNT_DISTINCT count occurrences and do not require a measureId. AVG, MAX, MIN, and SUM aggregate a specific numeric field and require a measureId."},"dimensionIds":{"description":"Field IDs to group by (TEXT fields only). References dimension fields from the business object. These are the fields you use for grouping results, e.g., group by user or region.","type":"array","items":{"type":"string"}},"dimensions":{"description":"Information about the IDs included in the dimensionIds -- the fields you grouped by.","type":"array","items":{"$ref":"#/components/schemas/BusinessObjectField"}},"filters":{"description":"Filtering criteria for the metric.","type":"array","items":{"$ref":"#/components/schemas/MetricFilter"}},"businessObject":{"description":"Optional nested object with details of the source Business Object.","allOf":[{"$ref":"#/components/schemas/BusinessObject"}]}},"required":["id","name","measureId","businessObjectId","function"]},"BusinessObjectEditDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Business object name (1-50 characters).","example":"Event Tracker"},"isActive":{"type":"boolean","description":"Whether to start capturing data (default: false). At least one subscribe key must be specified in the subkeys array to activate.","default":false,"example":false},"description":{"type":"string","maxLength":200,"description":"Description (max 200 characters).","example":"Tracks event data from the application"},"fields":{"description":"Data fields for the business object (max 100).","type":"array","items":{"$ref":"#/components/schemas/FieldDto"}},"subkeys":{"minItems":1,"description":"PubNub subscribe keys to capture data from (min 0, max 10). Optional during setup, but at least one subscribe key must be specified to activate the Business Object.","example":["sub-c-1709195a-916f-4650-93f2-6f27ec000000"],"type":"array","items":{"type":"string"}}},"required":["name","subkeys"]},"JsonPathValidationDto":{"type":"object","properties":{"jsonPath":{"type":"string"}},"required":["jsonPath"]},"OemBusinessObjectDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Business object name (1-50 characters).","example":"Event Tracker"},"isActive":{"type":"boolean","description":"Whether to start capturing data (default: false). At least one subscribe key must be specified in the subkeys array to activate.","default":false,"example":false},"description":{"type":"string","maxLength":200,"description":"Description (max 200 characters).","example":"Tracks event data from the application"},"fields":{"description":"Data fields for the business object (max 100).","type":"array","items":{"$ref":"#/components/schemas/FieldDto"}},"subkeys":{"minItems":1,"description":"PubNub subscribe keys to capture data from (min 0, max 10). Optional during setup, but at least one subscribe key must be specified to activate the Business Object.","example":["sub-c-1709195a-916f-4650-93f2-6f27ec000000"],"type":"array","items":{"type":"string"}}},"required":["name","subkeys"]},"OemDecision":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"id":{"type":"string","description":"PubNub-generated unique ID for the decision. Omit when creating. Required in later requests to update, delete, or retrieve this decision."},"name":{"type":"string","description":"Decision name (1-50 characters)."},"description":{"type":"string","description":"Description (max 200 characters)."},"accountId":{"type":"string","description":"Your PubNub account ID."},"businessObjectId":{"type":"string","description":"ID of the associated business object."},"sourceType":{"type":"string","description":"Decision source type: BUSINESSOBJECT, METRIC, or QUERY. METRIC evaluates an aggregated metric value. BUSINESSOBJECT evaluates each event in real time. QUERY evaluates rows from a saved query.","enum":["BUSINESSOBJECT","METRIC","QUERY"]},"sourceId":{"type":"string","description":"ID of the metric, business object, or query used as the data source. If sourceType is METRIC, provide the metric ID. If sourceType is BUSINESSOBJECT, provide the business object ID. If sourceType is QUERY, provide the query ID."},"hitType":{"type":"string","description":"Rule matching behavior: SINGLE (stop at first match) or MULTIPLE (evaluate all rules).","enum":["SINGLE","MULTI"]},"enabled":{"type":"boolean","description":"Whether decision is active (default: false). Must be false when creating a decision. Active decisions cannot have their inputFields, outputFields, or actions modified."},"activeFrom":{"format":"date-time","type":"string","description":"Start date/time for activation (ISO 8601, UTC)."},"activeUntil":{"format":"date-time","type":"string","description":"End date/time for deactivation (ISO 8601, UTC)."},"executeOnce":{"type":"boolean","description":"Execute actions only once when conditions are satisfied for the first time."},"executionFrequency":{"type":"number","description":"Evaluation frequency in seconds. Allowed values: 60, 300, 600, 900, 1800, 3600, 86400."},"inputFields":{"description":"Input fields for decision conditions. Required if sourceType is BUSINESSOBJECT (provide sourceType=\"FIELD\" and sourceId referencing a business object field). For METRIC decisions, input fields are auto-populated from the metric's measure and dimensions. For QUERY decisions, input fields are auto-populated from the query output fields (sourceType=\"QUERYFIELD\").","type":"array","items":{"$ref":"#/components/schemas/DecisionInputField"}},"outputFields":{"description":"Custom variables for use in actions. Define a name (display label) and variable (reference name for action templates).","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputField"}},"rules":{"description":"Decision rules containing conditions and actions. Rules reference auto-generated IDs from inputFields, outputFields, and actions. Add rules in a separate PUT request after the decision is created.","type":"array","items":{"$ref":"#/components/schemas/DecisionRule"}},"actions":{"description":"Available actions for rules to execute.","type":"array","items":{"$ref":"#/components/schemas/Action"}},"businessObject":{"$ref":"#/components/schemas/OemBusinessObject"},"metric":{"$ref":"#/components/schemas/OemMetric"}},"required":["id","name","accountId","hitType","enabled","executeOnce"]},"OemChart":{"type":"object","properties":{"accountId":{"type":"string","description":"Account ID associated with the chart."},"id":{"type":"string","description":"Chart ID. Omit when creating; required for updates."},"name":{"type":"string","description":"Chart name (1-50 characters)."},"metricId":{"type":"string","description":"ID of the metric to display."},"viewType":{"enum":["BAR","LINE","STACKED"],"type":"string","description":"Chart visualization type: BAR, LINE, or STACKED."},"size":{"type":"string","description":"Chart size: FULL (full width) or HALF (half width).","enum":["HALF","FULL"]},"showDecisions":{"type":"boolean","description":"Whether to display decision overlays on the chart."},"dimensionIds":{"description":"Default selected dimensions for grouping. References field IDs from the business object.","type":"array","items":{"type":"string"}},"decisionIds":{"description":"Decision IDs to overlay on the chart.","type":"array","items":{"type":"string"}},"metric":{"$ref":"#/components/schemas/OemMetric"}},"required":["accountId","id","name","viewType","size","showDecisions","dimensionIds","decisionIds","metric"]},"OemDashboard":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"id":{"type":"string","description":"PubNub-generated unique ID for the dashboard. Omit when creating. Required in later requests to update, delete, or retrieve the dashboard."},"name":{"type":"string","description":"Dashboard title (max 50 characters)."},"accountId":{"type":"string","description":"Your PubNub account ID."},"dateRange":{"enum":["30 minutes","1 hour","24 hours","3 days","1 week","30 days","3 months","Custom date"],"type":"string","description":"Date range for dashboard data: 30 minutes, 1 hour, 24 hours, 3 days, 1 week, 30 days, 3 months, or Custom date."},"startDate":{"format":"date-time","type":"string","description":"Custom start date/time (ISO 8601). Required when dateRange is Custom date."},"endDate":{"format":"date-time","type":"string","description":"Custom end date/time (ISO 8601). Required when dateRange is Custom date."},"charts":{"type":"array","items":{"$ref":"#/components/schemas/OemChart"}}},"required":["id","name","accountId","dateRange","charts"]},"OemBusinessObject":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp (ISO 8601, UTC)."},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp (ISO 8601, UTC)."},"createdBy":{"type":"string","nullable":true,"description":"Email of the creator."},"updatedBy":{"type":"string","nullable":true,"description":"Email of the last updater."},"id":{"type":"string","description":"PubNub-generated unique ID for the Business Object. Required in later requests for GET, UPDATE, and DELETE methods."},"name":{"type":"string","description":"Business object name (1-50 characters)."},"isActive":{"type":"boolean","description":"Whether to start capturing data (default: false). At least one subscribe key must be specified in the subkeys array to activate."},"description":{"type":"string","description":"Description (max 200 characters)."},"fields":{"description":"Data fields for the business object (max 100).","type":"array","items":{"$ref":"#/components/schemas/BusinessObjectField"}},"accountId":{"type":"string","description":"Your PubNub account ID."},"subkeys":{"description":"PubNub subscribe keys to capture data from (min 0, max 10). Optional during setup, but at least one subscribe key must be specified to activate the Business Object.","type":"array","items":{"type":"string"}},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/OemMetric"}},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/OemDecision"}},"dashboards":{"type":"array","items":{"$ref":"#/components/schemas/OemDashboard"}},"queries":{"type":"array","items":{"$ref":"#/components/schemas/Query"}}},"required":["id","name","isActive","accountId","subkeys"]},"OemMetric":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the metric. Omit when creating; the API auto-generates the ID. Required in later requests to update, delete, or retrieve the metric."},"name":{"type":"string","description":"Metric name (1-50 characters)."},"measureId":{"type":"string","description":"Field ID to aggregate. Required for AVG, MAX, MIN, SUM functions -- references a NUMERIC field from the business object. Must be omitted for COUNT and COUNT_DISTINCT functions."},"businessObjectId":{"type":"string","description":"ID of the source business object. Use the id returned from creating or listing business objects."},"evaluationWindow":{"type":"number","description":"Time period in seconds for metric evaluation. Allowed values: 60 (1 min), 300 (5 min), 600 (10 min), 900 (15 min), 1800 (30 min), 3600 (1 hour), 86400 (1 day)."},"function":{"type":"string","description":"Aggregation function: AVG, COUNT, COUNT_DISTINCT, MAX, MIN, or SUM. COUNT and COUNT_DISTINCT count occurrences and do not require a measureId. AVG, MAX, MIN, and SUM aggregate a specific numeric field and require a measureId."},"dimensionIds":{"description":"Field IDs to group by (TEXT fields only). References dimension fields from the business object. These are the fields you use for grouping results, e.g., group by user or region.","type":"array","items":{"type":"string"}},"dimensions":{"description":"Information about the IDs included in the dimensionIds -- the fields you grouped by.","type":"array","items":{"$ref":"#/components/schemas/BusinessObjectField"}},"filters":{"description":"Filtering criteria for the metric.","type":"array","items":{"$ref":"#/components/schemas/MetricFilter"}},"businessObject":{"$ref":"#/components/schemas/OemBusinessObject"}},"required":["id","name","measureId","businessObjectId","function"]},"MetricFilterDto":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated ID for the metric filter. Omit when creating; required when updating a metric (PUT).","example":"12646b2a-7e42-4f3b-a82c-db16a0b00000"},"sourceType":{"type":"string","description":"Filter source type. Value must always be DIMENSION.","enum":["MEASURE","DIMENSION"],"example":"DIMENSION"},"sourceId":{"type":"string","description":"ID of the field or data field to filter on. References a TEXT field from the business object.","example":"b20214f9-0677-4e65-a60b-b12a13200000"},"operation":{"type":"string","description":"Filter operation: STRING_EQUALS, STRING_NOT_EQUAL, STRING_CONTAINS, STRING_NOT_CONTAINS, STRING_IS_EMPTY, STRING_IS_NOT_EMPTY, STRING_STARTS_WITH, STRING_ENDS_WITH.","enum":["NUMERIC_GREATER_THAN","NUMERIC_GREATER_THAN_EQUALS","NUMERIC_LESS_THAN","NUMERIC_LESS_THAN_EQUALS","NUMERIC_INCLUSIVE_BETWEEN","NUMERIC_EXCLUSIVE_NOT_BETWEEN","BOOLEAN_IS_TRUE","BOOLEAN_IS_FALSE","STRING_CONTAINS","STRING_NOT_CONTAINS","STRING_STARTS_WITH","STRING_ENDS_WITH","STRING_EQUALS","STRING_IS_EMPTY","STRING_IS_NOT_EMPTY","STRING_NOT_EQUALS"],"example":"STRING_EQUALS"},"arguments":{"minItems":1,"maxItems":2,"description":"Filter arguments (1 string). Matching is case-sensitive.","example":["purchase"],"type":"array","items":{"type":"string"}}},"required":["sourceType","sourceId","operation","arguments"]},"MetricDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Metric name (1-50 characters).","example":"Total Events by Type"},"id":{"type":"string","description":"PubNub-generated unique ID for the metric. Omit when creating; the API auto-generates the ID. Required in later requests to update, delete, or retrieve the metric.","example":"21583568-cb7b-4413-8166-f56d0c800000"},"businessObjectId":{"type":"string","description":"ID of the source business object. Use the id returned from creating or listing business objects.","example":"19b9c407-6269-44a4-a5ec-d581dbb00000"},"measureId":{"type":"string","description":"Field ID to aggregate. Required for AVG, MAX, MIN, SUM functions -- references a NUMERIC field from the business object. Must be omitted for COUNT and COUNT_DISTINCT functions.","example":"b2021234-0656-4e78-a60b-b12a13200000"},"evaluationWindow":{"type":"number","minimum":1,"maximum":86400,"description":"Time period in seconds for metric evaluation. Allowed values: 60 (1 min), 300 (5 min), 600 (10 min), 900 (15 min), 1800 (30 min), 3600 (1 hour), 86400 (1 day).","example":3600},"function":{"type":"string","description":"Aggregation function: AVG, COUNT, COUNT_DISTINCT, MAX, MIN, or SUM. COUNT and COUNT_DISTINCT count occurrences and do not require a measureId. AVG, MAX, MIN, and SUM aggregate a specific numeric field and require a measureId.","enum":["AVG","SUM","MAX","MIN","COUNT","COUNT_DISTINCT"],"example":"AVG"},"dimensionIds":{"description":"Field IDs to group by (TEXT fields only). References dimension fields from the business object. These are the fields you use for grouping results, e.g., group by user or region.","example":["b20214f9-0677-4e65-a60b-b12a13200000"],"type":"array","items":{"type":"string"}},"filters":{"description":"Filtering criteria for the metric.","type":"array","items":{"$ref":"#/components/schemas/MetricFilterDto"}}},"required":["name","businessObjectId","evaluationWindow","function"]},"DecisionInputFieldDto":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the input field. Omit when creating. Required when creating or updating rules (referenced as inputFieldId in rule inputValues).","example":"3f774b4e-abf5-420f-b0b4-0ba80f000000"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Label for the input field (1-50 characters).","example":"Event Count"},"sourceType":{"type":"object","description":"Source type for the input field. Use FIELD for BUSINESSOBJECT decisions. For METRIC decisions, this is auto-populated from the metric. For QUERY decisions, this is auto-populated as QUERYFIELD.","example":"FIELD"},"sourceId":{"type":"string","description":"ID of metric field/dimension to use as input or condition. References a field from the business object.","example":"b20214f9-0677-4e65-a60b-b12a13200000"}},"required":["name","sourceType","sourceId"]},"DecisionOutputFieldDto":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the output field. Omit when creating.","example":"d76505e6-d51f-4f3c-bb5d-c65eed000000"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Label of the custom variable in the rules table (1-50 characters).","example":"Alert Message"},"variable":{"type":"string","minLength":1,"maxLength":50,"description":"Name of the custom variable used in action templates (1-50 characters). Reference in templates as ${variable_name}.","example":"alertMessage"}},"required":["name"]},"DecisionInputValueDto":{"type":"object","properties":{"inputFieldId":{"type":"string","description":"References inputFields[].id from the decision. Use the auto-generated ID from the create/get response.","example":"3f774b4e-abf5-420f-b0b4-0ba80f000000"},"operation":{"enum":["NUMERIC_EQUALS","NUMERIC_NOT_EQUALS","NUMERIC_GREATER_THAN","NUMERIC_GREATER_THAN_EQUALS","NUMERIC_LESS_THAN","NUMERIC_LESS_THAN_EQUALS","NUMERIC_INCLUSIVE_BETWEEN","STRING_EQUALS","STRING_NOT_EQUALS","STRING_CONTAINS","STRING_NOT_CONTAINS","STRING_STARTS_WITH","STRING_NOT_STARTS_WITH","STRING_ENDS_WITH","STRING_NOT_ENDS_WITH","TIME_SINCE_GREATER_THAN","TIME_SINCE_GREATER_THAN_EQUALS","TIME_SINCE_LESS_THAN","TIME_SINCE_LESS_THAN_EQUALS","TIME_SINCE_EQUALS","TIME_SINCE_NOT_EQUALS","TIME_SINCE_INCLUSIVE_BETWEEN","TIME_UNTIL_GREATER_THAN","TIME_UNTIL_GREATER_THAN_EQUALS","TIME_UNTIL_LESS_THAN","TIME_UNTIL_LESS_THAN_EQUALS","TIME_UNTIL_EQUALS","TIME_UNTIL_NOT_EQUALS","TIME_UNTIL_INCLUSIVE_BETWEEN","ANY"],"type":"string","description":"Condition operation: ANY, NUMERIC_EQUALS, NUMERIC_NOT_EQUALS, NUMERIC_GREATER_THAN, NUMERIC_GREATER_THAN_EQUALS, NUMERIC_LESS_THAN, NUMERIC_LESS_THAN_EQUALS, NUMERIC_INCLUSIVE_BETWEEN, STRING_EQUALS, STRING_NOT_EQUALS, STRING_CONTAINS.","example":"NUMERIC_GREATER_THAN"},"argument":{"type":"string","maxLength":92,"description":"Condition argument (max 92 characters). Empty string if operation is ANY. For NUMERIC_INCLUSIVE_BETWEEN, separate numbers by comma (e.g., \"2,7\").","example":"100"}},"required":["operation"]},"DecisionOutputValueDto":{"type":"object","properties":{"outputFieldId":{"type":"string","description":"References outputFields[].id. Use the auto-generated ID from the create/get response.","example":"d76505e6-d51f-4f3c-bb5d-c65eed000000"},"value":{"type":"string","maxLength":200,"description":"Value that your custom variable will send in actions (max 200 characters).","example":"Threshold exceeded"}},"required":["outputFieldId","value"]},"ActionValueDto":{"type":"object","properties":{"actionId":{"type":"string","description":"Action ID from POST/GET method response. Use the auto-generated ID.","example":"5f6afd68-1d3c-45a1-8a1a-3291fa000000"},"status":{"type":"boolean","description":"Whether action is active for this rule (true = execute when conditions satisfied, false = do not execute).","example":true},"executionLimitType":{"type":"string","description":"How often to execute when conditions satisfied. Options: ALWAYS (default), ONCE_PER_INTERVAL, ONCE_PER_INTERVAL_PER_CONDITION, ONCE_PER_INTERVAL_PER_CONDITION_GROUP.","enum":["ALWAYS","ONCE","ONCE_PER_INTERVAL","ONCE_PER_CONDITION_GROUP","ONCE_PER_INTERVAL_PER_CONDITION_GROUP"],"example":"ALWAYS"},"executionLimitIntervalInSeconds":{"type":"number","description":"Execution interval in seconds: 60, 300, 600, 900, 1800, 3600, 86400. Required if executionLimitType is ONCE_PER_INTERVAL or ONCE_PER_INTERVAL_PER_CONDITION."},"executionLimitInputFieldIds":{"description":"Field IDs for execution limits. Required if executionLimitType is ONCE_PER_INTERVAL_PER_CONDITION.","type":"array","items":{"type":"string"}}},"required":["actionId","status"]},"DecisionRuleDto":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the rule. Required for updating rules directly."},"inputValues":{"description":"List of conditions to evaluate.","type":"array","items":{"$ref":"#/components/schemas/DecisionInputValueDto"}},"outputValues":{"description":"Values to assign to outputs when conditions match.","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputValueDto"}},"actionValues":{"description":"Actions to trigger when conditions match.","type":"array","items":{"$ref":"#/components/schemas/ActionValueDto"}}}},"ActionDto":{"type":"object","properties":{"id":{"type":"string","description":"PubNub-generated unique ID for the action. Omit when creating. Required when referencing an action in rules (as actionId in actionValues).","example":"5f6afd68-1d3c-45a1-8a1a-3291fa000000"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Name for the action (1-50 characters).","example":"Publish Alert"},"description":{"type":"string","maxLength":200,"description":"Optional description of the action (max 200 characters).","example":"Publishes an alert to a PubNub channel"},"actionType":{"type":"string","description":"Action type: PUBNUB_PUBLISH, WEBHOOK_EXECUTION, APPCONTEXT_SET_USER_METADATA, APPCONTEXT_SET_CHANNEL_METADATA, APPCONTEXT_SET_MEMBERSHIP_METADATA.","enum":["WEBHOOK_EXECUTION","PUBNUB_PUBLISH","APPCONTEXT_SET_USER_METADATA","APPCONTEXT_SET_CHANNEL_METADATA","APPCONTEXT_SET_MEMBERSHIP_METADATA"]},"template":{"type":"object","description":"Action template structure. Format depends on actionType. Supports variables like ${inputFieldId} or ${outputVariable} to insert dynamic values."},"note":{"type":"string","maxLength":2048,"description":"Additional notes (max 2,048 characters)."}},"required":["name"]},"DecisionDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Decision name (1-50 characters).","example":"Threshold Alert"},"description":{"type":"string","maxLength":200,"description":"Description (max 200 characters).","example":"Triggers an alert when conditions are met"},"sourceType":{"type":"string","description":"Decision source type: BUSINESSOBJECT, METRIC, or QUERY. METRIC evaluates an aggregated metric value. BUSINESSOBJECT evaluates each event in real time. QUERY evaluates rows from a saved query.","enum":["BUSINESSOBJECT","METRIC","QUERY"],"example":"METRIC"},"sourceId":{"type":"string","description":"ID of the metric, business object, or query used as the data source. If sourceType is METRIC, provide the metric ID. If sourceType is BUSINESSOBJECT, provide the business object ID. If sourceType is QUERY, provide the query ID.","example":"21583568-cb7b-4413-8166-f56d0c800000"},"hitType":{"type":"string","description":"Rule matching behavior: SINGLE (stop at first match) or MULTIPLE (evaluate all rules).","enum":["SINGLE","MULTI"],"example":"SINGLE"},"enabled":{"type":"boolean","description":"Whether decision is active (default: false). Must be false when creating a decision. Active decisions cannot have their inputFields, outputFields, or actions modified.","default":false,"example":false},"activeFrom":{"format":"date-time","type":"string","description":"Start date/time for activation (ISO 8601, UTC).","example":"2025-10-01T00:00:00Z"},"activeUntil":{"format":"date-time","type":"string","description":"End date/time for deactivation (ISO 8601, UTC).","example":"2025-12-31T23:59:59Z"},"executeOnce":{"type":"boolean","description":"Execute actions only once when conditions are satisfied for the first time.","example":false},"executionFrequency":{"type":"number","maximum":86400,"description":"Evaluation frequency in seconds. Allowed values: 60, 300, 600, 900, 1800, 3600, 86400.","example":60},"inputFields":{"description":"Input fields for decision conditions. Required if sourceType is BUSINESSOBJECT (provide sourceType=\"FIELD\" and sourceId referencing a business object field). For METRIC decisions, input fields are auto-populated from the metric's measure and dimensions. For QUERY decisions, input fields are auto-populated from the query output fields (sourceType=\"QUERYFIELD\").","type":"array","items":{"$ref":"#/components/schemas/DecisionInputFieldDto"}},"outputFields":{"description":"Custom variables for use in actions. Define a name (display label) and variable (reference name for action templates).","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputFieldDto"}},"rules":{"description":"Decision rules containing conditions and actions. Rules reference auto-generated IDs from inputFields, outputFields, and actions. Add rules in a separate PUT request after the decision is created.","type":"array","items":{"$ref":"#/components/schemas/DecisionRuleDto"}},"actions":{"description":"Available actions for rules to execute.","type":"array","items":{"$ref":"#/components/schemas/ActionDto"}},"customerId":{"type":"string","nullable":true,"description":"Customer ID for OEM partners (requires Partner Portal). Can only be set when creating the decision."}},"required":["name","sourceType","sourceId"]},"DecisionEditDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Decision name (1-50 characters).","example":"Threshold Alert"},"description":{"type":"string","maxLength":200,"description":"Description (max 200 characters).","example":"Triggers an alert when conditions are met"},"sourceType":{"type":"string","description":"Decision source type: BUSINESSOBJECT, METRIC, or QUERY. METRIC evaluates an aggregated metric value. BUSINESSOBJECT evaluates each event in real time. QUERY evaluates rows from a saved query.","enum":["BUSINESSOBJECT","METRIC","QUERY"],"example":"METRIC"},"sourceId":{"type":"string","description":"ID of the metric, business object, or query used as the data source. If sourceType is METRIC, provide the metric ID. If sourceType is BUSINESSOBJECT, provide the business object ID. If sourceType is QUERY, provide the query ID.","example":"21583568-cb7b-4413-8166-f56d0c800000"},"hitType":{"type":"string","description":"Rule matching behavior: SINGLE (stop at first match) or MULTIPLE (evaluate all rules).","enum":["SINGLE","MULTI"],"example":"SINGLE"},"enabled":{"type":"boolean","description":"Whether decision is active (default: false). Must be false when creating a decision. Active decisions cannot have their inputFields, outputFields, or actions modified.","default":false,"example":false},"activeFrom":{"format":"date-time","type":"string","description":"Start date/time for activation (ISO 8601, UTC).","example":"2025-10-01T00:00:00Z"},"activeUntil":{"format":"date-time","type":"string","description":"End date/time for deactivation (ISO 8601, UTC).","example":"2025-12-31T23:59:59Z"},"executeOnce":{"type":"boolean","description":"Execute actions only once when conditions are satisfied for the first time.","example":false},"executionFrequency":{"type":"number","maximum":86400,"description":"Evaluation frequency in seconds. Allowed values: 60, 300, 600, 900, 1800, 3600, 86400.","example":60},"inputFields":{"description":"Input fields for decision conditions. Required if sourceType is BUSINESSOBJECT (provide sourceType=\"FIELD\" and sourceId referencing a business object field). For METRIC decisions, input fields are auto-populated from the metric's measure and dimensions. For QUERY decisions, input fields are auto-populated from the query output fields (sourceType=\"QUERYFIELD\").","type":"array","items":{"$ref":"#/components/schemas/DecisionInputFieldDto"}},"outputFields":{"description":"Custom variables for use in actions. Define a name (display label) and variable (reference name for action templates).","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputFieldDto"}},"rules":{"description":"Decision rules containing conditions and actions. Rules reference auto-generated IDs from inputFields, outputFields, and actions. Add rules in a separate PUT request after the decision is created.","type":"array","items":{"$ref":"#/components/schemas/DecisionRuleDto"}},"actions":{"description":"Available actions for rules to execute.","type":"array","items":{"$ref":"#/components/schemas/ActionDto"}}},"required":["name","sourceType","sourceId"]},"ActionDataQuery":{"type":"object","properties":{"startDate":{"format":"date-time","type":"string","description":"Start date for action data query (ISO 8601).","example":"2025-10-01T00:00:00Z"},"endDate":{"format":"date-time","type":"string","description":"End date for action data query (ISO 8601).","example":"2025-10-31T23:59:59Z"},"utcOffsetSec":{"type":"number","description":"UTC offset in seconds for timezone adjustment.","example":0},"aggregationWindow":{"type":"number","enum":[60,300,600,900,1800,3600,7200,10800,14400,21600,28800,43200,86400],"description":"Aggregation window in seconds.","example":3600}},"required":["startDate","endDate"]},"ActionData":{"type":"object","properties":{}},"ResetActionLimitDto":{"type":"object","properties":{"ruleId":{"type":"string","description":"ID of the rule containing the action to reset.","example":"270bfe1c-f6bb-477b-be3f-dcbe59000000"},"actionId":{"type":"string","description":"ID of the action whose execution limits should be reset.","example":"5f6afd68-1d3c-45a1-8a1a-3291fa000000"}},"required":["ruleId","actionId"]},"ResetActionLimitListDto":{"type":"object","properties":{"ruleActions":{"minItems":1,"description":"List of rule actions to reset. At least one is required.","type":"array","items":{"$ref":"#/components/schemas/ResetActionLimitDto"}}}},"OemDecisionDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Decision name (1-50 characters).","example":"Threshold Alert"},"description":{"type":"string","maxLength":200,"description":"Description (max 200 characters).","example":"Triggers an alert when conditions are met"},"sourceType":{"type":"string","description":"Decision source type: BUSINESSOBJECT, METRIC, or QUERY. METRIC evaluates an aggregated metric value. BUSINESSOBJECT evaluates each event in real time. QUERY evaluates rows from a saved query.","enum":["BUSINESSOBJECT","METRIC","QUERY"],"example":"METRIC"},"sourceId":{"type":"string","description":"ID of the metric, business object, or query used as the data source. If sourceType is METRIC, provide the metric ID. If sourceType is BUSINESSOBJECT, provide the business object ID. If sourceType is QUERY, provide the query ID.","example":"21583568-cb7b-4413-8166-f56d0c800000"},"hitType":{"type":"string","description":"Rule matching behavior: SINGLE (stop at first match) or MULTIPLE (evaluate all rules).","enum":["SINGLE","MULTI"],"example":"SINGLE"},"enabled":{"type":"boolean","description":"Whether decision is active (default: false). Must be false when creating a decision. Active decisions cannot have their inputFields, outputFields, or actions modified.","default":false,"example":false},"activeFrom":{"format":"date-time","type":"string","description":"Start date/time for activation (ISO 8601, UTC).","example":"2025-10-01T00:00:00Z"},"activeUntil":{"format":"date-time","type":"string","description":"End date/time for deactivation (ISO 8601, UTC).","example":"2025-12-31T23:59:59Z"},"executeOnce":{"type":"boolean","description":"Execute actions only once when conditions are satisfied for the first time.","example":false},"executionFrequency":{"type":"number","maximum":86400,"description":"Evaluation frequency in seconds. Allowed values: 60, 300, 600, 900, 1800, 3600, 86400.","example":60},"inputFields":{"description":"Input fields for decision conditions. Required if sourceType is BUSINESSOBJECT (provide sourceType=\"FIELD\" and sourceId referencing a business object field). For METRIC decisions, input fields are auto-populated from the metric's measure and dimensions. For QUERY decisions, input fields are auto-populated from the query output fields (sourceType=\"QUERYFIELD\").","type":"array","items":{"$ref":"#/components/schemas/DecisionInputFieldDto"}},"outputFields":{"description":"Custom variables for use in actions. Define a name (display label) and variable (reference name for action templates).","type":"array","items":{"$ref":"#/components/schemas/DecisionOutputFieldDto"}},"rules":{"description":"Decision rules containing conditions and actions. Rules reference auto-generated IDs from inputFields, outputFields, and actions. Add rules in a separate PUT request after the decision is created.","type":"array","items":{"$ref":"#/components/schemas/DecisionRuleDto"}},"actions":{"description":"Available actions for rules to execute.","type":"array","items":{"$ref":"#/components/schemas/ActionDto"}}},"required":["name","sourceType","sourceId"]},"ChartDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Chart name (1-50 characters).","example":"Events Over Time"},"id":{"type":"string","description":"Chart ID. Omit when creating; required for updates.","example":"a989023f-4add-4498-91f0-98d1c5800000"},"metric":{"description":"Metric reference for the chart. On create, pass an object with the metric id (e.g., { id: \"metric-uuid\" }). In responses, this may include the full metric details.","allOf":[{"$ref":"#/components/schemas/MetricDto"}]},"viewType":{"enum":["BAR","LINE","STACKED"],"type":"string","description":"Chart visualization type: BAR, LINE, or STACKED.","example":"LINE"},"size":{"type":"string","description":"Chart size: FULL (full width) or HALF (half width).","enum":["HALF","FULL"],"example":"FULL"},"showDecisions":{"type":"boolean","description":"Whether to display decision overlays on the chart.","example":true},"dimensionIds":{"description":"Default selected dimensions for grouping. References field IDs from the business object.","example":["b20214f9-0677-4e65-a60b-b12a13200000"],"type":"array","items":{"type":"string"}},"decisionIds":{"description":"Decision IDs to overlay on the chart.","example":["a41c8507-46ce-496f-ba0d-f7319a000000"],"type":"array","items":{"type":"string"}}},"required":["name","metric","viewType"]},"DashboardDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Dashboard title (max 50 characters).","example":"Event Analytics Dashboard"},"charts":{"description":"List of charts to display on the dashboard.","type":"array","items":{"$ref":"#/components/schemas/ChartDto"}},"dateRange":{"type":"string","description":"Date range for dashboard data: 30 minutes, 1 hour, 24 hours, 3 days, 1 week, 30 days, 3 months, or Custom date.","enum":["30 minutes","1 hour","24 hours","3 days","1 week","30 days","3 months","Custom date"],"example":"24 hours"},"startDate":{"format":"date-time","type":"string","description":"Custom start date/time (ISO 8601). Required when dateRange is Custom date."},"endDate":{"format":"date-time","type":"string","description":"Custom end date/time (ISO 8601). Required when dateRange is Custom date."},"customerId":{"type":"string","nullable":true,"description":"Customer ID for OEM partners (requires Partner Portal). Can only be set when creating the dashboard."}},"required":["name","dateRange"]},"DashboardEditDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Dashboard title (max 50 characters).","example":"Event Analytics Dashboard"},"charts":{"description":"List of charts to display on the dashboard.","type":"array","items":{"$ref":"#/components/schemas/ChartDto"}},"dateRange":{"type":"string","description":"Date range for dashboard data: 30 minutes, 1 hour, 24 hours, 3 days, 1 week, 30 days, 3 months, or Custom date.","enum":["30 minutes","1 hour","24 hours","3 days","1 week","30 days","3 months","Custom date"],"example":"24 hours"},"startDate":{"format":"date-time","type":"string","description":"Custom start date/time (ISO 8601). Required when dateRange is Custom date."},"endDate":{"format":"date-time","type":"string","description":"Custom end date/time (ISO 8601). Required when dateRange is Custom date."}},"required":["name","dateRange"]},"OemDashboardDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Dashboard title (max 50 characters).","example":"Event Analytics Dashboard"},"charts":{"description":"List of charts to display on the dashboard.","type":"array","items":{"$ref":"#/components/schemas/ChartDto"}},"dateRange":{"type":"string","description":"Date range for dashboard data: 30 minutes, 1 hour, 24 hours, 3 days, 1 week, 30 days, 3 months, or Custom date.","enum":["30 minutes","1 hour","24 hours","3 days","1 week","30 days","3 months","Custom date"],"example":"24 hours"},"startDate":{"format":"date-time","type":"string","description":"Custom start date/time (ISO 8601). Required when dateRange is Custom date."},"endDate":{"format":"date-time","type":"string","description":"Custom end date/time (ISO 8601). Required when dateRange is Custom date."}},"required":["name","dateRange"]},"QueryResponseDto":{"type":"object","properties":{"data":{"description":"Array of result rows; each row is an object keyed by output field names or aliases.","type":"array","items":{"type":"object"}},"executionTime":{"type":"number","description":"Query execution time in milliseconds.","example":37},"queryDefinition":{"description":"The QueryRequestDto that was executed (echoed back).","allOf":[{"$ref":"#/components/schemas/QueryRequestDto"}]}},"required":["data","executionTime","queryDefinition"]},"QueryDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Query name (max 255 characters).","example":"Event Analysis Query"},"description":{"type":"string","maxLength":1000,"description":"Description (max 1000 characters).","example":"Aggregates events by user and type"},"definition":{"description":"Full query definition (QueryRequestDto).","allOf":[{"$ref":"#/components/schemas/QueryRequestDto"}]},"customerId":{"type":"string","nullable":true,"description":"Optional customer scope (nullable)."}},"required":["name","definition"]},"QueryEditDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Query name (max 255 characters).","example":"Event Analysis Query"},"description":{"type":"string","maxLength":1000,"description":"Description (max 1000 characters).","example":"Aggregates events by user and type"},"definition":{"description":"Full query definition (QueryRequestDto).","allOf":[{"$ref":"#/components/schemas/QueryRequestDto"}]}},"required":["name","definition"]},"CreatePredefinedDecisionDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"description":{"type":"string","maxLength":200},"configurationType":{"type":"string","maxLength":50},"customerId":{"type":"string","nullable":true}}},"OemKeyset":{"type":"object","properties":{"id":{"type":"number"},"applicationId":{"type":"number"},"name":{"type":"string"},"publishKey":{"type":"string"},"subscribeKey":{"type":"string"}},"required":["id","applicationId","name","publishKey","subscribeKey"]},"LimitsDto":{"type":"object","properties":{"decisionsPerAccount":{"type":"number"},"metricsPerAccount":{"type":"number"},"queriesPerAccount":{"type":"number"},"metricAggregationWindows":{"type":"array","items":{"type":"number"}},"decisionFrequencies":{"type":"array","items":{"type":"number"}},"actionTypes":{"type":"array","items":{"type":"string","enum":["PUBNUB_PUBLISH","WEBHOOK_EXECUTION","APPCONTEXT_SET_USER_METADATA","APPCONTEXT_SET_CHANNEL_METADATA","APPCONTEXT_SET_MEMBERSHIP_METADATA"]}},"businessObjectsPerAccount":{"type":"number"},"dashboardsPerAccount":{"type":"number"},"fieldsPerBusinessObject":{"type":"number"},"longStringFieldsPerBusinessObject":{"type":"number"},"keysetsPerBusinessObject":{"type":"number"},"metricsPerBusinessObject":{"type":"number"},"dimensionsPerMetric":{"type":"number"},"filtersPerMetric":{"type":"number"},"conditionsPerDecision":{"type":"number"},"outputsPerDecision":{"type":"number"},"actionsPerDecision":{"type":"number"},"rulesPerDecision":{"type":"number"},"webhookNumHeaders":{"type":"number"},"appContextNumCustomProperties":{"type":"number"},"chartsPerDashboard":{"type":"number"},"decisionsPerChart":{"type":"number"}},"required":["decisionsPerAccount","metricsPerAccount","queriesPerAccount","metricAggregationWindows","decisionFrequencies","actionTypes","businessObjectsPerAccount","dashboardsPerAccount","fieldsPerBusinessObject","longStringFieldsPerBusinessObject","keysetsPerBusinessObject","metricsPerBusinessObject","dimensionsPerMetric","filtersPerMetric","conditionsPerDecision","outputsPerDecision","actionsPerDecision","rulesPerDecision","webhookNumHeaders","appContextNumCustomProperties","chartsPerDashboard","decisionsPerChart"]},"OemUserContext":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string"}},"keysets":{"type":"array","items":{"$ref":"#/components/schemas/OemKeyset"}},"limits":{"$ref":"#/components/schemas/LimitsDto"}},"required":["permissions","keysets","limits"]},"Keyset":{"type":"object","properties":{"customer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Customer"}]},"id":{"type":"number"},"applicationId":{"type":"number"},"name":{"type":"string"},"publishKey":{"type":"string"},"subscribeKey":{"type":"string"}},"required":["id","applicationId","name","publishKey","subscribeKey"]},"ScheduledEventUpdateRequest":{"type":"object","properties":{"dttmBegin":{"type":"string","format":"date-time","example":"2026-03-15T09:00:00Z"},"dttmEnd":{"type":"string","format":"date-time","example":"2026-03-15T21:00:00Z"},"description":{"type":"string","example":"Updated schedule for peak hours","maxLength":255,"minLength":0}}},"ScheduledActionDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"f6a7b8c9-d0e1-2345-f012-3456789abcde"},"accountId":{"type":"integer","format":"int32","example":12345},"packageDeploymentId":{"type":"string","format":"uuid","example":"d4e5f6a7-b8c9-0123-def0-123456789abc"},"type":{"type":"string","enum":["START","STOP"],"example":"START"},"dttm":{"type":"string","format":"date-time","example":"2026-03-15T08:00:00.000Z"},"description":{"type":"string","example":"Scheduled start for morning traffic"},"state":{"type":"string","enum":["PENDING","EXECUTING","COMPLETED","FAILED"],"example":"PENDING"},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["accountId","createdDttm","dttm","id","packageDeploymentId","state","type"]},"ScheduledEventDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"a7b8c9d0-e1f2-3456-0123-456789abcdef"},"dttmBegin":{"type":"string","format":"date-time","example":"2026-03-15T08:00:00.000Z"},"dttmEnd":{"type":"string","format":"date-time","example":"2026-03-15T20:00:00.000Z"},"description":{"type":"string","example":"Scale up during peak hours"},"state":{"type":"string","enum":["PENDING","STARTING","RUNNING","FINISHING","COMPLETED","FAILED"],"example":"RUNNING"},"scheduledActions":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledActionDTO"}},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","dttmBegin","dttmEnd","id","scheduledActions","state"]},"PackageUpdateRequest":{"type":"object","properties":{"name":{"type":"string","example":"My Chat Functions (Renamed)","minLength":1},"description":{"type":"string","example":"Updated description for chat moderation functions"},"tags":{"type":"array","description":"Replaces the package's public tags. Omit (or send `null`) to leave existing tags unchanged.","example":["chat","moderation"],"items":{"type":"string","pattern":"[a-z_][a-z_0-9]{1,32}"},"maxItems":5,"minItems":0}},"required":["name"]},"PackageDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"packageBlueprintId":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"},"name":{"type":"string","example":"My Chat Functions","maxLength":255,"minLength":0},"description":{"type":"string","example":"Functions for real-time chat moderation"},"apiManaged":{"type":"boolean","description":"When true, blocks editing the package through the UI (e.g. creating new revisions).","example":false},"tags":{"type":"array","example":["chat","moderation"],"items":{"type":"string"}},"revisionsTotal":{"type":"integer","format":"int32","example":3,"minimum":1},"revisionsRunning":{"type":"integer","format":"int32","example":1,"minimum":0},"packageDeploymentsTotal":{"type":"integer","format":"int32","example":2,"minimum":0},"packageDeploymentsRunning":{"type":"integer","format":"int32","example":1,"minimum":0},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["apiManaged","createdDttm","id","name","packageDeploymentsRunning","packageDeploymentsTotal","revisionsRunning","revisionsTotal","tags"]},"PackageRevisionUpdateRequest":{"type":"object","properties":{"name":{"type":"string","example":"v1.2.1","minLength":1},"description":{"type":"string","example":"Hotfix for profanity filter edge case"}},"required":["name"]},"ChannelBasedFunctionConfig":{"properties":{"type":{"type":"string","$ref":"#/components/schemas/FunctionType"},"inputChannel":{"type":"string","example":"chat.*"},"outputChannel":{"type":"string","description":"Channel where function logs are published. If omitted, defaults to `output-rev-{functionRevisionId}-key-{keysetId}`."}},"required":["inputChannel","type"]},"Config":{"type":"object","discriminator":{"propertyName":"type","mapping":{"BEFORE_PUBLISH":"#/components/schemas/ChannelBasedFunctionConfig","BEFORE_PUBLISH_FILE":"#/components/schemas/ChannelBasedFunctionConfig","BEFORE_SIGNAL":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_PUBLISH":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_PUBLISH_FILE":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_PRESENCE":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_SIGNAL":"#/components/schemas/ChannelBasedFunctionConfig","ON_REST":"#/components/schemas/RestFunctionConfig","ON_INTERVAL":"#/components/schemas/OnIntervalFunctionConfig","ON_INTERVAL_WITH_SUBSCRIPTION":"#/components/schemas/OnIntervalWithSubscriptionFunctionConfig"}},"oneOf":[{"$ref":"#/components/schemas/ChannelBasedFunctionConfig"},{"$ref":"#/components/schemas/RestFunctionConfig"},{"$ref":"#/components/schemas/OnIntervalFunctionConfig"},{"$ref":"#/components/schemas/OnIntervalWithSubscriptionFunctionConfig"}],"properties":{"type":{"type":"string","$ref":"#/components/schemas/FunctionType"}}},"FunctionDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"b2c3d4e5-f6a7-8901-bcde-f12345678901"},"functionRevisionId":{"type":"string","format":"uuid","example":"c3d4e5f6-a7b8-9012-cdef-123456789012"},"packageRevisionId":{"type":"string","format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","example":"Profanity Filter","maxLength":255,"minLength":0},"language":{"type":"string","$ref":"#/components/schemas/FunctionLanguage","example":"JAVASCRIPT"},"type":{"type":"string","$ref":"#/components/schemas/FunctionType","example":"BEFORE_PUBLISH"},"sortOrder":{"type":"integer","format":"int32","description":"Position of the function in the list. Used for display ordering.","example":0},"code":{"type":"string","example":"export default (request) => { console.log(request); return request.ok(); };","maxLength":200000,"minLength":0},"config":{"discriminator":{"propertyName":"type","mapping":{"BEFORE_PUBLISH":"#/components/schemas/ChannelBasedFunctionConfig","BEFORE_PUBLISH_FILE":"#/components/schemas/ChannelBasedFunctionConfig","BEFORE_SIGNAL":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_PUBLISH":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_PUBLISH_FILE":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_PRESENCE":"#/components/schemas/ChannelBasedFunctionConfig","AFTER_SIGNAL":"#/components/schemas/ChannelBasedFunctionConfig","ON_REST":"#/components/schemas/RestFunctionConfig","ON_INTERVAL":"#/components/schemas/OnIntervalFunctionConfig","ON_INTERVAL_WITH_SUBSCRIPTION":"#/components/schemas/OnIntervalWithSubscriptionFunctionConfig"}},"oneOf":[{"$ref":"#/components/schemas/ChannelBasedFunctionConfig"},{"$ref":"#/components/schemas/OnIntervalFunctionConfig"},{"$ref":"#/components/schemas/OnIntervalWithSubscriptionFunctionConfig"},{"$ref":"#/components/schemas/RestFunctionConfig"}]},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["code","config","createdDttm","functionRevisionId","id","language","name","packageRevisionId","sortOrder","type"]},"OnIntervalFunctionConfig":{"properties":{"type":{"type":"string","$ref":"#/components/schemas/FunctionType"},"intervalBetweenStartOfExecutionsMillis":{"type":"integer","format":"int32","example":60000},"limitOfRetries":{"type":"integer","format":"int32","example":3},"intervalBetweenStartOfRetriesMillis":{"type":"integer","format":"int32","example":5000},"outputChannel":{"type":"string","description":"Channel where function logs are published. If omitted, defaults to `output-rev-{functionRevisionId}-key-{keysetId}`."}},"required":["intervalBetweenStartOfExecutionsMillis","type"]},"OnIntervalWithSubscriptionFunctionConfig":{"properties":{"type":{"type":"string","$ref":"#/components/schemas/FunctionType"},"intervalBetweenStartOfExecutionsMillis":{"type":"integer","format":"int32","example":60000},"limitOfRetries":{"type":"integer","format":"int32","example":3},"intervalBetweenStartOfRetriesMillis":{"type":"integer","format":"int32","example":5000},"inputChannels":{"type":"array","items":{"type":"string"},"maxItems":1},"outputChannel":{"type":"string","description":"Channel where function logs are published. If omitted, defaults to `output-rev-{functionRevisionId}-key-{keysetId}`."}},"required":["inputChannels","intervalBetweenStartOfExecutionsMillis","type"]},"PackageRevisionDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"packageId":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"v1.2.0","maxLength":255,"minLength":0},"description":{"type":"string","example":"Added profanity filter function"},"packageDeploymentsTotal":{"type":"integer","format":"int32","example":2,"minimum":0},"packageDeploymentsRunning":{"type":"integer","format":"int32","example":1,"minimum":0},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"},"functions":{"type":"array","items":{"$ref":"#/components/schemas/FunctionDTO"}}},"required":["createdDttm","functions","id","name","packageDeploymentsRunning","packageDeploymentsTotal","packageId"]},"RestFunctionConfig":{"properties":{"type":{"type":"string","$ref":"#/components/schemas/FunctionType"},"path":{"type":"string","example":"my-webhook"},"outputChannel":{"type":"string","description":"Channel where function logs are published. If omitted, defaults to `output-rev-{functionRevisionId}-key-{keysetId}`."}},"required":["path","type"]},"PackageDeploymentRollingUpdateRequest":{"type":"object","properties":{"newPackageDeploymentId":{"type":"string","description":"ID of the new package deployment that will replace the currently running one.","example":"e5f6a7b8-c9d0-1234-ef01-23456789abcd"}}},"FunctionDeploymentDTO":{"type":"object","properties":{"functionRevisionId":{"type":"string","format":"uuid","example":"c3d4e5f6-a7b8-9012-cdef-123456789012"},"state":{"type":"string","enum":["STARTING","RESTARTING","RUNNING","STOPPING","STOPPED","FAILED"],"example":"RUNNING"},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","functionRevisionId","state"]},"PackageDeploymentDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"d4e5f6a7-b8c9-0123-def0-123456789abc"},"packageRevisionId":{"type":"string","format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"keysetId":{"type":"integer","format":"int32","example":12345},"state":{"type":"string","enum":["STARTING","RESTARTING","RUNNING","STOPPING","STOPPED","FAILED"],"example":"STOPPED"},"functionDeployments":{"type":"array","items":{"$ref":"#/components/schemas/FunctionDeploymentDTO"}},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","functionDeployments","id","keysetId","packageRevisionId","state"]},"StringUpsertRequest":{"type":"object","properties":{"value":{"type":"string","example":"dark-mode","maxLength":32000,"minLength":1},"ttlSeconds":{"type":"integer","format":"int32","example":3600,"maximum":31536000,"minimum":20}}},"SecretUpsertRequest":{"type":"object","properties":{"value":{"type":"string","example":"sk_live_abc123def456"}}},"SecretDTO":{"type":"object","properties":{"key":{"type":"string","example":"api_key_stripe","maxLength":1000,"minLength":0}},"required":["key"]},"JsonUpsertRequest":{"type":"object","properties":{"value":{"example":{"theme":"dark","notifications":true}},"ttlSeconds":{"type":"integer","format":"int32","example":3600,"maximum":31536000,"minimum":20}}},"FunctionRevisionTestInputCreateUpdateRequest":{"type":"object","properties":{"payload":{"type":"string","example":{"message":"Hello, World!"}},"mimeType":{"type":"string","example":"application/json","minLength":1,"pattern":"application/octet-stream|text/plain|application/json"},"description":{"type":"string","example":"Basic chat message payload"}},"required":["mimeType","payload"]},"FunctionTestInputDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"e5f6a7b8-c9d0-1234-ef01-23456789abcd"},"functionRevisionId":{"type":"string","format":"uuid","example":"c3d4e5f6-a7b8-9012-cdef-123456789012"},"payload":{"type":"string","example":{"message":"Hello, World!"}},"mimeType":{"type":"string","example":"application/json","pattern":"application/octet-stream|text/plain|application/json"},"description":{"type":"string","example":"Basic chat message payload"},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","functionRevisionId","id","mimeType","payload"]},"ScheduledEventCreateRequest":{"type":"object","properties":{"packageDeploymentId":{"type":"string","example":"d4e5f6a7-b8c9-0123-def0-123456789abc"},"dttmBegin":{"type":"string","format":"date-time","example":"2026-03-15T08:00:00Z"},"dttmEnd":{"type":"string","format":"date-time","example":"2026-03-15T20:00:00Z"},"description":{"type":"string","example":"Scale up during peak hours","maxLength":255,"minLength":0}},"required":["dttmBegin","dttmEnd"]},"FunctionCreateRequest":{"type":"object","properties":{"name":{"type":"string","example":"Profanity Filter","minLength":1},"language":{"type":"string","$ref":"#/components/schemas/FunctionLanguage","example":"JAVASCRIPT"},"code":{"type":"string","example":"export default (request) => { console.log(request); return request.ok(); };","maxLength":200000,"minLength":1},"type":{"type":"string","$ref":"#/components/schemas/FunctionType","example":"BEFORE_PUBLISH"},"config":{"$ref":"#/components/schemas/Config"},"sortOrder":{"type":"integer","format":"int32","description":"Position of the function in the list. Used for display ordering.","maximum":32767,"minimum":0},"testInputs":{"type":"array","items":{"$ref":"#/components/schemas/FunctionRevisionTestInputCreateUpdateRequest"},"maxItems":10,"minItems":0}},"required":["code","language","name","type"]},"PackageCreateRequest":{"type":"object","properties":{"name":{"type":"string","example":"My Chat Functions","minLength":1},"description":{"type":"string","example":"Functions for real-time chat moderation"},"apiManaged":{"type":"boolean","description":"When true, blocks editing the package through the UI (e.g. creating new revisions).","example":false},"tags":{"type":"array","example":["chat","moderation"],"items":{"type":"string","pattern":"[a-z_][a-z_0-9]{1,32}"},"maxItems":5,"minItems":0},"revisionName":{"type":"string","example":"v1.0.0","minLength":1},"revisionDescription":{"type":"string","example":"Initial release"},"functions":{"type":"array","items":{"$ref":"#/components/schemas/FunctionCreateRequest"},"maxItems":30,"minItems":1}},"required":["functions","name","revisionName"]},"FunctionCreateOrUpdateRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing function to update. Omit when creating a new function.","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","example":"Profanity Filter","minLength":1},"language":{"type":"string","$ref":"#/components/schemas/FunctionLanguage","example":"JAVASCRIPT"},"code":{"type":"string","example":"export default (request) => { console.log(request); return request.ok(); };","maxLength":200000,"minLength":1},"type":{"type":"string","$ref":"#/components/schemas/FunctionType","example":"BEFORE_PUBLISH"},"config":{"$ref":"#/components/schemas/Config"},"sortOrder":{"type":"integer","format":"int32","description":"Position of the function in the list. Used for display ordering.","maximum":32767,"minimum":0},"testInputs":{"type":"array","items":{"$ref":"#/components/schemas/FunctionRevisionTestInputCreateUpdateRequest"},"maxItems":10,"minItems":0}},"required":["code","language","name","type"]},"PackageRevisionCreateRequest":{"type":"object","properties":{"packageId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"v1.1.0","minLength":1},"description":{"type":"string","example":"Added profanity filter"},"functions":{"type":"array","items":{"$ref":"#/components/schemas/FunctionCreateOrUpdateRequest"},"maxItems":30,"minItems":1}},"required":["functions","name"]},"PackageDeploymentCreateRequest":{"type":"object","properties":{"packageRevisionId":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"keysetId":{"type":"integer","format":"int32","example":12345}}},"FunctionImportRequest":{"type":"object","properties":{"functionBlueprintId":{"type":"string","example":"d4e5f6a7-b8c9-0123-def0-123456789abc"},"name":{"type":"string","example":"Profanity Filter"},"sortOrder":{"type":"integer","format":"int32","maximum":32767,"minimum":0},"params":{"type":"array","items":{"$ref":"#/components/schemas/FunctionParam"},"maxItems":10,"minItems":0}}},"FunctionParam":{"type":"object","properties":{"functionBlueprintParamId":{"type":"string","example":"e5f6a7b8-c9d0-1234-ef01-23456789abcd"},"key":{"type":"string","example":"API_KEY"},"value":{"type":"string","example":"my-api-key-value"}}},"PackageImportFromBlueprintRequest":{"type":"object","properties":{"keysetId":{"type":"integer","format":"int32","example":12345,"minimum":0},"name":{"type":"string","example":"My Chat Functions"},"description":{"type":"string","example":"Functions for real-time chat moderation"},"apiManaged":{"type":"boolean","description":"When true, blocks editing the package through the UI (e.g. creating new revisions).","example":false},"tags":{"type":"array","example":["chat","moderation"],"items":{"type":"string","pattern":"[a-z_][a-z_0-9]{1,32}"},"maxItems":5,"minItems":0},"revisionName":{"type":"string","example":"v1.0.0","minLength":1},"revisionDescription":{"type":"string","example":"Initial release"},"functions":{"type":"array","items":{"$ref":"#/components/schemas/FunctionImportRequest"},"maxItems":30,"minItems":0}},"required":["keysetId","revisionName"]},"CounterMutateRequest":{"type":"object","properties":{"value":{"type":"integer","format":"int64","example":1}}},"IntersectedPackageDeploymentsDTO":{"type":"object","properties":{"channel":{"type":"string","example":"chat.*"},"packageDeployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageDeploymentDTO"}}},"required":["channel","packageDeployments"]},"PackageBlueprintDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","pattern":"^[a-f0-9-]{36}$"},"parentId":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7","pattern":"^[a-f0-9-]{36}$"},"name":{"type":"string","example":"Chat Moderation","maxLength":255,"minLength":0},"version":{"type":"string","example":"1.0.0","maxLength":16,"minLength":0},"description":{"type":"string","example":"A package for real-time chat moderation"},"documentation":{},"iconBase64":{"type":"string","minLength":1},"iconMediaType":{"type":"string","example":"image/png","minLength":1},"state":{"type":"string","enum":["GENERAL_AVAILABILITY","LIMITED_AVAILABILITY","NOT_AVAILABLE"],"example":"GENERAL_AVAILABILITY","minLength":1},"tags":{"type":"array","items":{"$ref":"#/components/schemas/PackageBlueprintTagDTO"},"minItems":1,"uniqueItems":true},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","documentation","iconBase64","iconMediaType","id","name","state","tags","version"]},"PackageBlueprintTagDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","pattern":"^[a-f0-9-]{36}$"},"name":{"type":"string","example":"chat","maxLength":255,"minLength":0},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"],"example":"PUBLIC"},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","id","name"]},"FunctionBlueprintDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"b2c3d4e5-f6a7-8901-bcde-f12345678901"},"packageBlueprintId":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"Profanity Filter","maxLength":255,"minLength":0},"type":{"type":"string","$ref":"#/components/schemas/FunctionType","example":"BEFORE_PUBLISH"},"language":{"type":"string","$ref":"#/components/schemas/FunctionLanguage","example":"JAVASCRIPT"},"code":{"type":"string","example":"export default (request) => { console.log(request); return request.ok(); };","maxLength":200000,"minLength":0},"params":{"type":"array","items":{"$ref":"#/components/schemas/FunctionBlueprintParamDTO"}},"testInputs":{"type":"array","items":{"$ref":"#/components/schemas/FunctionBlueprintTestInputDTO"}},"config":{"$ref":"#/components/schemas/Config"},"sortOrder":{"type":"integer","format":"int32","example":0},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["code","config","createdDttm","id","language","name","packageBlueprintId","sortOrder","type"]},"FunctionBlueprintParamDTO":{"type":"object","properties":{"id":{"type":"string","example":"c3d4e5f6-a7b8-9012-cdef-123456789012"},"name":{"type":"string","example":"API Key","maxLength":255,"minLength":0},"sourceName":{"type":"string","example":"API_KEY","maxLength":64,"minLength":0},"type":{"type":"string","enum":["CORE","CUSTOM"],"example":"CUSTOM"},"valueType":{"type":"string","enum":["STRING","URL","CHANNEL_NAME"],"example":"STRING"},"storage":{"type":"string","enum":["SOURCE_CODE","VAULT","KV"],"example":"VAULT"},"description":{"type":"string","example":"Third-party API key for external service integration"},"defaultValue":{"type":"string","example":"sk_live_default"},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","id","name","sourceName","storage","type","valueType"]},"FunctionBlueprintTestInputDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"d4e5f6a7-b8c9-0123-def0-123456789abc","pattern":"^[a-f0-9-]{36}$"},"functionBlueprintId":{"type":"string","format":"uuid","example":"b2c3d4e5-f6a7-8901-bcde-f12345678901","pattern":"^[a-f0-9-]{36}$"},"name":{"type":"string","example":"Hello World Message","maxLength":255,"minLength":0},"payload":{"type":"string","example":{"message":"Hello, World!"},"maxLength":16384,"minLength":0},"mimeType":{"type":"string","example":"application/json","maxLength":64,"minLength":0},"description":{"type":"string","example":"Simple test message for the profanity filter","maxLength":255,"minLength":0},"createdDttm":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["createdDttm","functionBlueprintId","id","mimeType","name","payload"]},"LimitDTO":{"type":"object","properties":{"name":{"type":"string","example":"max_packages"},"description":{"type":"string","example":"Maximum number of packages per account"},"maxValue":{"example":"10","oneOf":[{},{},{},{}]},"currentValue":{"example":"3","oneOf":[{},{},{},{}]}},"required":["currentValue","description","maxValue","name"]},"AccountStateDTO":{"type":"object","properties":{"state":{"type":"string","enum":["ACTIVE","MIGRATING","FAILED_MIGRATION","DISABLED"],"example":"MIGRATING"},"reason":{"type":"string","example":"Account is being migrated to the Functions v3.1"},"updatedDttm":{"type":"string","format":"date-time","example":"2026-02-01T14:20:00.000Z"}},"required":["state","updatedDttm"]},"ErrorDTO":{"type":"object","properties":{"code":{"type":"string","example":"FAAS-404"},"message":{"type":"string","example":"Entity not found"}},"required":["code","message"]},"MetaDTO":{"type":"object","properties":{"timestamp":{"type":"string","example":"2026-03-10T12:00:00.000Z"},"correlationId":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}},"required":["correlationId","timestamp"]},"MetaPagedDTO":{"type":"object","properties":{"timestamp":{"type":"string","example":"2026-03-10T12:00:00.000Z"},"correlationId":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"paging":{"properties":{"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"},"pageSize":{"type":"integer","format":"int64"},"pageNumber":{"type":"integer","format":"int64"},"pageOffset":{"type":"integer","format":"int64"}}}},"required":["correlationId","paging","timestamp"]},"MetaCursorPagedDTO":{"type":"object","properties":{"timestamp":{"type":"string","example":"2026-03-10T12:00:00.000Z"},"correlationId":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"paging":{"type":"object","properties":{"pageSize":{"type":"integer","format":"int32","description":"Number of entries per page","example":100},"pageToken":{"type":"string","description":"Token to fetch the next page. Null when there are no more pages.","example":"0x00000a..."}}}},"required":["correlationId","paging","timestamp"]},"ErrorEnvelope":{"type":"object","description":"Standard error response envelope.","properties":{"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"StringKeyValueDTO":{"type":"object","description":"A string key-value entry.","properties":{"key":{"type":"string","example":"user:preferences:12345","maxLength":1000},"value":{"type":"string","example":"dark-mode"},"ttlSeconds":{"type":"integer","format":"int32","example":3600,"minimum":0}},"required":["key","ttlSeconds","value"]},"JsonKeyValueDTO":{"type":"object","description":"A JSON key-value entry.","properties":{"key":{"type":"string","example":"user:preferences:12345","maxLength":1000},"value":{"example":{"theme":"dark","fontSize":14}},"ttlSeconds":{"type":"integer","format":"int32","example":3600,"minimum":0}},"required":["key","ttlSeconds","value"]},"CounterKeyValueDTO":{"type":"object","description":"A counter key-value entry.","properties":{"key":{"type":"string","example":"user:preferences:12345","maxLength":1000},"value":{"type":"integer","format":"int64","example":42},"ttlSeconds":{"type":"integer","format":"int32","example":3600,"minimum":0}},"required":["key","ttlSeconds","value"]},"FunctionType":{"type":"string","enum":["BEFORE_PUBLISH","BEFORE_PUBLISH_FILE","BEFORE_SIGNAL","AFTER_PUBLISH","AFTER_PUBLISH_FILE","AFTER_PRESENCE","AFTER_SIGNAL","ON_INTERVAL","ON_INTERVAL_WITH_SUBSCRIPTION","ON_REST"]},"FunctionLanguage":{"type":"string","enum":["JAVASCRIPT"]},"ScheduledEventDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ScheduledEventDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PackageDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageRevisionDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PackageRevisionDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageDeploymentDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PackageDeploymentDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"StringKeyValueDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/StringKeyValueDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"SecretDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SecretDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionTestInputDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FunctionTestInputDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"ScheduledEventDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledEventDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PackageDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionTestInputDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FunctionTestInputDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageRevisionDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PackageRevisionDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageDeploymentDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PackageDeploymentDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FunctionDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"IntersectedPackageDeploymentsDTOListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntersectedPackageDeploymentsDTO"}},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageBlueprintDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PackageBlueprintDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageBlueprintDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PackageBlueprintDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionBlueprintDTOListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FunctionBlueprintDTO"}},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"LimitDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LimitDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"StringKeyValueDTOCursorPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StringKeyValueDTO"}},"meta":{"$ref":"#/components/schemas/MetaCursorPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"SecretDTOCursorPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SecretDTO"}},"meta":{"$ref":"#/components/schemas/MetaCursorPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"JsonKeyValueDTOCursorPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JsonKeyValueDTO"}},"meta":{"$ref":"#/components/schemas/MetaCursorPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"CounterKeyValueDTOCursorPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CounterKeyValueDTO"}},"meta":{"$ref":"#/components/schemas/MetaCursorPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionBlueprintParamDTOListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FunctionBlueprintParamDTO"}},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionBlueprintParamDTOPagedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FunctionBlueprintParamDTO"}},"meta":{"$ref":"#/components/schemas/MetaPagedDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"FunctionBlueprintParamDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FunctionBlueprintParamDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"AccountStateDTOResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountStateDTO"},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"PackageDeploymentDTOListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PackageDeploymentDTO"}},"meta":{"$ref":"#/components/schemas/MetaDTO"},"errors":{"type":"array","example":[],"items":{"$ref":"#/components/schemas/ErrorDTO"}}},"required":["errors","meta"]},"MetricsResponse":{"type":"object","properties":{"status":{"type":"string","description":"Status of given metrics"},"reason":{"type":"string","description":"Reason of failed metric. Available only when status is failed"},"code":{"type":"number","description":"Status code of the metrics"}},"required":["status","code"]},"BaseApiResponse":{"type":"object","properties":{"metrics":{"description":"Status for each requested metric.","example":{"new_vs_recurring_users":{"status":"failed","reason":"Invalid period","code":400},"unique_users_by_country":{"status":"successful"}},"allOf":[{"$ref":"#/components/schemas/MetricsResponse"}]},"dataResult":{"type":"object","example":{"unique_users_by_country":[{"timestamp_value":"2023-10-01T00:00:00.000Z","period":"daily","country":"Poland","unique_users":3122},{"timestamp_value":"2023-10-01T00:00:00.000Z","period":"daily","country":"Slovakia","unique_users":139},{"timestamp_value":"2023-10-01T00:00:00.000Z","period":"daily","country":"Portual","unique_users":14208},{"timestamp_value":"2023-10-01T00:00:00.000Z","period":"daily","country":"Ecuador","unique_users":24}]},"description":"Query results keyed by metric name."}},"required":["metrics","dataResult"]},"BadRequestExceptionResponse":{"type":"object","properties":{"statusCode":{"type":"number","example":400},"message":{"example":["period must be one of the following values: hourly, daily"],"type":"array","items":{"type":"string"}},"error":{"type":"string","example":"Bad Request"}},"required":["statusCode","message","error"]},"UnauthorizedResponse":{"type":"object","properties":{"statusCode":{"type":"number","example":401},"message":{"type":"string","example":"Unauthorized"}},"required":["statusCode","message"]},"ForbiddenResourceErrorResponse":{"type":"object","properties":{"statusCode":{"type":"number","example":403},"message":{"type":"string","example":"Forbidden resource"},"error":{"type":"string","example":"Forbidden"}},"required":["statusCode","message","error"]},"CreateEntityClassRequest":{"description":"Request body for creating an entity class","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/RequestEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntityClassProperties","exampleSetFlag":false}},"exampleSetFlag":false,"types":["object"]}]},"UpdateEntityClassRequest":{"description":"Request body for updating an entity class","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/RequestEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntityClassUpdateProperties","exampleSetFlag":false}},"exampleSetFlag":false,"types":["object"]}]},"UpdateRelationshipClassRequest":{"description":"Request body for updating a relationship class","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/RequestEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RelationshipClassUpdateProperties","exampleSetFlag":false}},"exampleSetFlag":false,"types":["object"]}]},"RelationshipClassUpdateProperties":{"type":"object","properties":{"description":{"type":"string","description":"Optional description of the relationship class","exampleSetFlag":false,"types":["string"]},"properties":{"type":"array","description":"List of class properties (replaces existing properties on update)","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/Property","exampleSetFlag":false},"types":["array"]}},"description":"Updatable properties for a relationship class","exampleSetFlag":false,"types":["object"]},"Property":{"required":["name","path","valueKind"],"type":"object","properties":{"name":{"type":"string","description":"Unique semantic identifier for the property.\n","exampleSetFlag":false,"types":["string"]},"path":{"description":"Pointer to the property value within the record. User-defined\nvalues live under `/payload/`, so a payload field named `username`\nhas the path `/payload/username`.\n","example":"/payload/username","exampleSetFlag":true,"allOf":[{"$ref":"#/components/schemas/JsonPointer","exampleSetFlag":false}]},"valueKind":{"type":"string","description":"Data type of the property value.\n\n`number` values are stored as 64-bit floats, so a magnitude above\n9007199254740991 (2^53-1) is rejected with `DS-0008` rather than\nsilently rounded. Store larger identifiers as `string`.\n","exampleSetFlag":false,"types":["string"],"enum":["string","number","boolean","date","datetime"]},"filtering":{"type":"string","description":"Controls search indexing for this property.\n- none: not searchable (default)\n- simple: stored in DB for SQL-based filter and sort\n- full: stored in DB and indexed for full-text search\n","nullable":true,"exampleSetFlag":false,"types":["string"],"enum":["none","simple","full"]},"isNullable":{"type":"boolean","description":"Whether the property can have null values.","exampleSetFlag":false,"types":["boolean"],"default":true},"projections":{"type":"array","description":"Projections this field belongs to. Defaults to [{name: \"__default__\"}].\nRemove __default__ to restrict the field to named projections only.\nMax 3 distinct projection names per class.\n","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/Property_projections","exampleSetFlag":false},"types":["array"]}},"exampleSetFlag":false,"types":["object"]},"EntityClassesEnvelope":{"description":"List of entity classes","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ResponseEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"type":"array","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/EntityClassResource","exampleSetFlag":false},"types":["array"]}},"exampleSetFlag":false,"types":["object"]}]},"EntityClassEnvelope":{"description":"Single entity class","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ResponseEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntityClassResource","exampleSetFlag":false}},"exampleSetFlag":false,"types":["object"]}]},"EntityClassResource":{"exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/EntityClassResourceProperties","exampleSetFlag":false},{"$ref":"#/components/schemas/EntityClassProperties","exampleSetFlag":false},{"required":["config"],"exampleSetFlag":false}]},"EntityClassResourceProperties":{"required":["createdAt","eTag","level","updatedAt","version"],"type":"object","properties":{"name":{"exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false},{"description":"Unique semantic identifier for the entity class.","exampleSetFlag":false}]},"level":{"description":"The level at which this class is defined.","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ClassLevel","exampleSetFlag":false}]},"createdAt":{"type":"string","description":"Date and time the entity class was created.","format":"date-time","exampleSetFlag":false,"types":["string"]},"updatedAt":{"type":"string","description":"Date and time the entity class was last updated.","format":"date-time","exampleSetFlag":false,"types":["string"]},"eTag":{"type":"string","description":"The entity's content fingerprint used in conditional requests.","exampleSetFlag":false,"types":["string"]},"version":{"type":"integer","description":"Version of an entity class","exampleSetFlag":false,"types":["integer"]}},"description":"Default properties for entity class responses (without id; a class is identified by the triplet name, level and version)","exampleSetFlag":false,"types":["object"]},"EntityClassProperties":{"type":"object","properties":{"description":{"maxLength":1000,"type":"string","description":"Human-readable description documenting semantic intent and ownership scope.","exampleSetFlag":false,"types":["string"]},"config":{"description":"Entity class configuration. Required when creating a standalone class (no extends).\nWhen extends is provided and config is omitted, the parent's config is inherited.\n","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/EntityClassConfig","exampleSetFlag":false}]},"extends":{"$ref":"#/components/schemas/Extends","exampleSetFlag":false},"properties":{"type":"array","description":"Optional list of properties for searchable\nproperties. If omitted, payload is treated as opaque JSON.\nWhen extending a parent class, parent properties are auto-inherited.\nChild may declare additional properties or override filtering/projections\non inherited ones.\n","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/Property","exampleSetFlag":false},"types":["array"]}},"example":{"name":"user-profile","description":"Entity class for storing user profile information including basic details and preferences","version":1,"config":{"ttlSec":2678400},"properties":[{"name":"username","path":"/payload/username","valueKind":"string","filtering":"full"},{"name":"email","path":"/payload/email","valueKind":"string","filtering":"simple","isNullable":true},{"name":"dateOfBirth","path":"/payload/dateOfBirth","valueKind":"date","filtering":"simple"},{"name":"isActive","path":"/payload/isActive","valueKind":"boolean","filtering":"simple"},{"name":"score","path":"/payload/score","valueKind":"number","filtering":"simple"}]},"exampleSetFlag":true,"types":["object"]},"EntityClassUpdateProperties":{"required":["config","properties"],"type":"object","properties":{"description":{"maxLength":1000,"type":"string","description":"Human-readable description documenting semantic intent and ownership scope.","exampleSetFlag":false,"types":["string"]},"config":{"$ref":"#/components/schemas/EntityClassConfig","exampleSetFlag":false},"properties":{"type":"array","description":"Optional list of properties for searchable\nproperties. If omitted, existing properties are preserved.\n","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/Property","exampleSetFlag":false},"types":["array"]}},"description":"Properties for updating an entity class. Config is always required on update.","exampleSetFlag":false,"types":["object"]},"Extends":{"required":["name","version"],"type":"object","properties":{"name":{"type":"string","description":"Name of the parent class.","exampleSetFlag":false,"types":["string"]},"version":{"type":"integer","description":"Version of the parent class.","exampleSetFlag":false,"types":["integer"]}},"description":"Reference to the parent class this class extends.","exampleSetFlag":false,"types":["object"]},"EntityClassConfig":{"required":["ttlSec"],"type":"object","properties":{"ttlSec":{"maximum":315569260,"minimum":0,"type":"integer","description":"Time-to-live in seconds for entities of this class.\nDefault is 31 days, maximum is 10 years\n","exampleSetFlag":false,"types":["integer"],"default":2678400}},"exampleSetFlag":false,"types":["object"]},"CreateRelationshipClassRequest":{"description":"Request body for creating a relationship class","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/RequestEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RelationshipClassProperties","exampleSetFlag":false}},"exampleSetFlag":false,"types":["object"]}]},"RelationshipClassesEnvelope":{"description":"List of relationship classes","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ResponseEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"type":"array","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/RelationshipClassResource","exampleSetFlag":false},"types":["array"]}},"exampleSetFlag":false,"types":["object"]}]},"RelationshipClassEnvelope":{"description":"Single relationship class","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ResponseEnvelope","exampleSetFlag":false},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RelationshipClassResource","exampleSetFlag":false}},"exampleSetFlag":false,"types":["object"]}]},"RelationshipClassResource":{"exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/RelationshipClassResourceProperties","exampleSetFlag":false},{"$ref":"#/components/schemas/RelationshipClassProperties","exampleSetFlag":false}]},"RelationshipClassResourceProperties":{"required":["createdAt","eTag","name","updatedAt","version"],"type":"object","properties":{"name":{"exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false},{"description":"Unique semantic identifier for the relationship class","exampleSetFlag":false}]},"createdAt":{"type":"string","description":"Date and time the relationship class was created","format":"date-time","exampleSetFlag":false,"types":["string"]},"updatedAt":{"type":"string","description":"Date and time the relationship class was last updated","format":"date-time","exampleSetFlag":false,"types":["string"]},"eTag":{"type":"string","description":"The relationship's content fingerprint used in conditional requests","exampleSetFlag":false,"types":["string"]},"version":{"type":"integer","description":"Version number of the relationship class","exampleSetFlag":false,"types":["integer"]}},"description":"Default properties for relationship class responses","exampleSetFlag":false,"types":["object"]},"RelationshipClassProperties":{"required":["cardinality"],"type":"object","properties":{"description":{"maxLength":1000,"type":"string","description":"Human-readable description documenting the relationship class purpose","exampleSetFlag":false,"types":["string"]},"cardinality":{"$ref":"#/components/schemas/RelationshipClassCardinality","exampleSetFlag":false},"entityAClass":{"type":"string","description":"Name of the entity class for the source (A) side of the relationship.\nIf omitted, any entity class can be used as the source.\n","exampleSetFlag":false,"types":["string"]},"entityAClassLevel":{"description":"Class level to resolve entityAClass at. Defaults to standard resolution\n(SubKey → Global) if not specified.\n","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ClassLevel","exampleSetFlag":false}]},"entityBClass":{"type":"string","description":"Name of the entity class for the target (B) side of the relationship.\nIf omitted, any entity class can be used as the target.\n","exampleSetFlag":false,"types":["string"]},"entityBClassLevel":{"description":"Class level to resolve entityBClass at. Defaults to standard resolution\n(SubKey → Global) if not specified.\n","exampleSetFlag":false,"allOf":[{"$ref":"#/components/schemas/ClassLevel","exampleSetFlag":false}]},"properties":{"type":"array","description":"Optional list of properties for searchable\nproperties on relationships of this class.\n","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/Property","exampleSetFlag":false},"types":["array"]}},"example":{"description":"Represents a parent-child relationship between entities","directed":true,"cardinality":"one-to-many","entityAClass":"Parent","entityBClass":"Child","properties":[{"name":"role","path":"/payload/role","valueKind":"string","filtering":"full"}]},"exampleSetFlag":true,"types":["object"]},"RelationshipClassCardinality":{"type":"string","description":"Defines multiplicity constraints for the relationship.\n- `one-to-one`: Each entity can participate in at most one relationship of this type\n- `one-to-many`: An entity is bound to the side it first appears on\n- `many-to-many`: No side constraints\n","exampleSetFlag":false,"types":["string"],"enum":["one-to-one","one-to-many","many-to-many"]},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","exampleSetFlag":false,"items":{"$ref":"#/components/schemas/ErrorItem","exampleSetFlag":false},"types":["array"]}},"description":"Error response envelope","exampleSetFlag":false,"types":["object"]},"ErrorItem":{"required":["errorCode","message"],"type":"object","properties":{"errorCode":{"type":"string","description":"A machine-readable error code. Stable across releases - use this, not `message`, for\nprogrammatic branching. The HTTP status for a given code is fixed.\n\nCodes are grouped by range. Not every code can occur on every operation; each response\ndocuments the subset it can return.\n\n**Generic**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | 500 | Unhandled server error, or a server-side routing configuration problem. |\n| `DS-0002` | BAD_REQUEST | 400 | Required header or query parameter missing, or request input otherwise unusable. |\n| `DS-0003` | INVALID_JSON | 400 | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | 400 | Body, path variable or query parameter failed validation. One error item per violation. |\n| `DS-0005` | INVALID_FILTER | 400 | **Deprecated**, no longer returned. Filter errors now use `DS-1000` to `DS-1004` below; handle those instead. |\n| `DS-0006` | INVALID_ARGUMENT | 400 | A parameter could not be used as sent: a value of the wrong type, a malformed JSON Pointer, an invalid `include` on a membership GET, or, on a list request, a `sort` field that is not sortable, a `cursor` that is corrupt or was returned by a request with a different `sort` or with `filter` added or dropped, or both `filter_fast` and `filter`. The `400` response of each list operation explains the list causes and how to fix them. |\n| `DS-0007` | UNSUPPORTED_CONTENT_TYPE | 415 | Request `Content-Type` not supported. |\n| `DS-0008` | UNEXPECTED_FILTERABLE_FIELD_VALUE | 400 | A declared class property's value does not match its `valueKind`, or is a `number` whose magnitude exceeds 9007199254740991 (2^53-1). |\n| `DS-0009` | SERVICE_UNAVAILABLE | 503 | A required dependency is unavailable, or the request could not be forwarded to its region. |\n| `DS-0010` | NOT_ACCEPTABLE | 406 | *Reserved - not currently emitted.* 406 responses carry a `text/plain` body with no error code. |\n| `DS-0011` | METHOD_NOT_ALLOWED | 405 | HTTP method not supported for this path. |\n\n**Resource (01xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0100` | NOT_FOUND | 404 | The addressed resource does not exist. |\n\n**Authorization (02xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | 403 | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | 403 | Access Manager not enabled, conflicting credentials supplied, or authorization check denied. |\n| `DS-0202` | INVALID_TOKEN | 403 | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |\n| `DS-0203` | UNAUTHENTICATED | 401 | No credentials supplied. |\n\n**State (03xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0300` | ETAG_MISMATCH | 412 | `If-Match` does not contain the resource's current ETag. |\n| `DS-0301` | CONFLICT | 409 | A resource with the same identity already exists. |\n| `DS-0302` | PATCH_TEST_FAILED | 409 | A JSON Patch `test` operation's `value` does not equal the current value at `path`. |\n\n**Size limits (04xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0400` | CONTENT_TOO_LARGE | 413 | *Reserved - not currently emitted.* |\n\n**Custom fields (05xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0500` | CUSTOM_NOT_SCALAR | 400 | *Reserved - not currently emitted.* |\n\n**Configuration (06xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0600` | CONFIG_NOT_FOUND | 404 | Subscribe key unknown to the configuration service, or its datasync region is not configured. |\n| `DS-0602` | UNSUPPORTED_ENTITY_PROPERTY_TYPE | 400 | A declared property's path resolves to a non-scalar node (object or array). |\n| `DS-0650` | NON_NULLABLE_PROPERTY | 400 | A property declared `nullable: false` is missing or explicitly `null`. |\n\n**Patch (07xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0700` | IMMUTABLE_FIELD_MODIFICATION | 400 | A patch targets a pointer outside the mutable set. Patch only. |\n\n**Relationships (08xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0800` | WRONG_ENTITY_CLASS_TYPE | 400 | An endpoint entity's class does not satisfy the relationship class for that side. Create only. |\n| `DS-0801` | CARDINALITY_VIOLATED | 409 | ONE-TO-ONE or ONE-TO-MANY cardinality already satisfied. Create only. |\n\n**Class management (09xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-0900` | GLOBAL_CLASS_MODIFICATION | 403 | Global class definitions are read-only. Replace and delete only. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | 400 | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | 400 | Projection name too long or malformed, or a property declares an empty projection list. |\n| `DS-0903` | INCOMPATIBLE_CHILD_PROPERTY | 400 | A redeclared inherited property differs from the parent in `path`, `valueKind`, or `nullable`. Entity classes only. |\n| `DS-0904` | MISSING_PARENT_PROPERTY | 400 | *Reserved - not currently emitted.* Missing parent properties are inherited automatically. |\n| `DS-0905` | CLASS_HAS_CHILDREN | 409 | The class still has subclasses and cannot be deleted. Entity classes only. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | 400 | A declared property uses the name of a built-in record field (`id`, `createdAt`, `updatedAt`, `status`). Only `status` may be re-declared, and only as `{name: \"status\", path: \"/status\"}` to control its projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | 400 | The entity or relationship class name matches a reserved name (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. Create only. |\n\n**Filter expression (10xx)**\n\n| Code | Constant | Status | Meaning |\n|---|---|---|---|\n| `DS-1000` | FILTER_PARSE_ERROR | 400 | `filter_fast` or `filter` is not valid filter syntax - for example a missing operator or value, an unclosed string or parenthesis, or text left over after a complete expression. |\n| `DS-1001` | FILTER_UNKNOWN_FIELD | 400 | The filter names a field it cannot filter on: the field is not declared on the class, is declared but not filterable with the parameter used (`filter_fast` needs `filtering` of `simple` or `full`, `filter` needs `full`), or is `status` and some projection the token can resolve to leaves it out. |\n| `DS-1002` | FILTER_TYPE_MISMATCH | 400 | A value does not match the field's `valueKind`, for example a string compared with a `number` field. A `date` field takes a string in `yyyy-MM-dd` form, and a `datetime` field an ISO-8601 instant with `Z` or an offset, so `2024-01-01T00:00:00` is rejected. |\n| `DS-1003` | FILTER_OPERATOR_MISUSE | 400 | The operator cannot be used with this field or value: `LIKE`, `SLIKE` or `ILIKE` on a field that is not a `string`, `<`, `<=`, `>` or `>=` on a `boolean` field, or any of these with `null`. |\n| `DS-1004` | FILTER_LIMIT_EXCEEDED | 400 | The filter has more comparisons than the subscribe key allows, 10 by default. Every `field operator value` counts once, however it is grouped or negated. |\n\n`DS-1000` to `DS-1003` also carry `location`, the part of the expression to highlight.","example":"DS-0100","exampleSetFlag":true,"types":["string"]},"message":{"type":"string","description":"A human-readable description of the error, intended for logs and diagnostics.\nNot stable across releases - do not parse or branch on it.","example":"Entity not found: user-42","exampleSetFlag":true,"types":["string"]},"path":{"type":"string","description":"The input that caused the error, for codes that can name one. What it holds depends on\nthe code:\n\n- a JSON Pointer into the request payload: `DS-0008`, `DS-0602`, `DS-0650`\n- a query parameter name: `sort` or `cursor` for `DS-0006` on a list request,\n  `include` for `DS-0006` on a membership GET (list or by ID),\n  `filter_fast` or `filter`, whichever was sent, for `DS-1000` to `DS-1004`, and\n  `auth` for `DS-0202` when a grant pattern is too complex to evaluate\n- a field name: `DS-0004`\n- a class property name: `DS-0903`\n\nOther `DS-0006` causes carry a payload pointer or no `path`. For `DS-1000` to `DS-1003`,\n`location` narrows it to the exact part of the filter expression.","example":"/payload/score","exampleSetFlag":true,"types":["string"]},"location":{"$ref":"#/components/schemas/ErrorLocation","exampleSetFlag":false}},"description":"Error object","exampleSetFlag":false,"types":["object"]},"ErrorLocation":{"required":["length","offset"],"type":"object","properties":{"offset":{"type":"integer","description":"Index of the first character of the range, counting from 0.","example":6,"exampleSetFlag":true,"types":["integer"]},"length":{"type":"integer","description":"Number of characters in the range. `0` means something is missing: the expression\nended where another token was expected, and `offset` marks where to insert it. A token\nthat is present but wrong always has a length above 0.","example":5,"exampleSetFlag":true,"types":["integer"]}},"description":"The part of the filter expression an error refers to, for highlighting it in an editor. The\nexpression is the value of the query parameter named by the error's `path`, `filter_fast` or\n`filter`. Sent with `DS-1000` to `DS-1003`. `DS-1004` has none, because it is about the\nwhole expression.\n\n`offset` and `length` count characters of that value after URL decoding, starting at 0.\nA character here is a UTF-16 code unit, as in a JavaScript string, so a character outside\nthe Basic Multilingual Plane, such as most emoji, counts as two. There are no line or column\nnumbers: each line-break character counts as one, like any other whitespace.","exampleSetFlag":false,"types":["object"]},"ClassLevel":{"type":"string","description":"The level at which a class is defined.","exampleSetFlag":false,"types":["string"],"enum":["Global","SubKey"]},"ClassName":{"maxLength":128,"minLength":1,"pattern":"^[a-zA-Z][a-zA-Z0-9_-]*$","type":"string","extensions":{"x-pattern-message":"Class name must start with a letter and contain only letters, digits, hyphens, and underscores"},"exampleSetFlag":false,"types":["string"]},"RequestEnvelope":{"required":["data"],"type":"object","properties":{"data":{"type":"object","description":"Request data (specific type defined in extending schemas)","exampleSetFlag":false,"types":["object"]}},"description":"Base request envelope (data only)","exampleSetFlag":false,"types":["object"]},"JsonPointer":{"pattern":"^(/[^/]*)*$","type":"string","description":"JSON Pointer (RFC 6901) to a location within a JSON document.\nMust be either empty string \"\" (refers to whole document) or start with \"/\" followed by reference tokens.","example":"/address/city","exampleSetFlag":true,"types":["string"]},"ResponseEnvelope":{"required":["data"],"type":"object","properties":{"data":{"type":"object","description":"Response data (specific type defined in extending schemas)","exampleSetFlag":false,"types":["object"]},"meta":{"$ref":"#/components/schemas/Meta","exampleSetFlag":false}},"description":"Base response envelope (data + meta)","exampleSetFlag":false,"types":["object"]},"Meta":{"required":["has_next","has_prev"],"type":"object","properties":{"next_cursor":{"type":"string","description":"Opaque cursor for the next page. Base64-encoded token.\nUse this value in the `cursor` query parameter to fetch the next page.\nNull if there are no more results (has_next is false).\n","nullable":true,"example":"eyJpIjoiMjAiLCJzdiI6WyJBZGEiXSwiYiI6ZmFsc2UsInMiOiJuYW1lOmFzYyIsImUiOiJkYiJ9","exampleSetFlag":true,"types":["string"]},"has_next":{"type":"boolean","description":"Indicates whether there are more results after this page. Exact when this page was\nfetched forward; when fetched backward (via `prev_cursor`), approximated from whether\na cursor was supplied at all, so it can be true even if the boundary row was since\ndeleted, or if a filtered search found nothing to return.\n","example":true,"exampleSetFlag":true,"types":["boolean"]},"prev_cursor":{"type":"string","description":"Opaque cursor for the page before this one. Base64-encoded token.\nUse this value in the `cursor` query parameter to fetch the previous page - the\ntoken itself carries the direction, so it goes in the same parameter as\n`next_cursor`. Null if there is no previous page (has_prev is false).\n","nullable":true,"example":"eyJpIjoiMjAiLCJzdiI6WyJBZGEiXSwiYiI6dHJ1ZSwicyI6Im5hbWU6YXNjIiwiZSI6ImRiIn0","exampleSetFlag":true,"types":["string"]},"has_prev":{"type":"boolean","description":"Indicates whether there are more results before this page. Exact when this page was\nfetched backward (via `prev_cursor`); when fetched forward, approximated from whether\na cursor was supplied at all, so it can be true even if the boundary row was since\ndeleted, or if a filtered search found nothing to return.\n","example":false,"exampleSetFlag":true,"types":["boolean"]},"limit":{"type":"integer","description":"The limit applied to this page (may differ from requested limit)","example":20,"exampleSetFlag":true,"types":["integer"]}},"description":"Cursor-based pagination metadata","exampleSetFlag":false,"types":["object"]},"Property_projections":{"required":["name"],"type":"object","properties":{"name":{"maxLength":64,"pattern":"^(__default__|[a-zA-Z0-9][a-zA-Z0-9_-]*)$","type":"string","description":"Projection name. Must be alphanumeric with hyphens/underscores allowed.\nThe reserved name \"__default__\" is the only value permitted to start with \"__\".\n","exampleSetFlag":false,"types":["string"]}},"exampleSetFlag":false},"HttpApiDecodeError":{"type":"object","required":["issues","message","_tag"],"properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"message":{"type":"string"},"_tag":{"type":"string","enum":["HttpApiDecodeError"]}},"additionalProperties":false,"description":"The request did not match the expected schema"},"Issue":{"type":"object","required":["_tag","path","message"],"properties":{"_tag":{"type":"string","enum":["Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden"],"description":"The tag identifying the type of parse issue"},"path":{"type":"array","items":{"$ref":"#/components/schemas/PropertyKey"},"description":"The path to the property where the issue occurred"},"message":{"type":"string","description":"A descriptive message explaining the issue"}},"additionalProperties":false,"description":"Represents an error encountered while parsing a value to match the schema"},"PropertyKey":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object","required":["_tag","key"],"properties":{"_tag":{"type":"string","enum":["symbol"]},"key":{"type":"string"}},"additionalProperties":false,"description":"an object to be decoded into a globally shared symbol"}]},"BadRequestError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["BadRequest"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"UnauthorizedError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["Unauthorized"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ForbiddenError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["Forbidden"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"PaidPlanRequiredError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["PaidPlanRequired"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"InternalErrorError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["InternalError"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"NotFoundError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["NotFound"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"NumberFromString":{"type":"string","description":"a string to be decoded into a number"},"UnsupportedPresenceRulesError":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"number"},"error":{"type":"string","enum":["UnsupportedPresenceRules"]},"message":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"BooleanFromString":{"type":"string","enum":["true","false"],"description":"a string to be decoded into a boolean"},"Date":{"type":"string","description":"a string to be decoded into a Date"},"MetricApiValue":{"type":"object","properties":{"date":{"format":"date-time","type":"string","example":"2020-07-22"},"value":{"type":"number","example":"4324"}},"required":["date","value"]},"MetricApiResponse":{"type":"object","properties":{"title":{"type":"string","example":"Audit"},"metric":{"type":"string","example":"accessmanager_audits_transactions"},"values":{"type":"array","items":{"$ref":"#/components/schemas/MetricApiValue"}}},"required":["title","metric","values"]},"UsageApiResponse":{"type":"object","properties":{"series":{"type":"array","items":{"$ref":"#/components/schemas/MetricApiResponse"}}},"required":["series"]},"SummaryResponse":{"type":"object","properties":{"txn_total":{"type":"number","example":4214},"replicated":{"type":"number","example":3241},"signals":{"type":"number","example":474456},"edge":{"type":"number","example":2346},"message_actions":{"type":"number","example":2457},"executions":{"type":"number","example":9763},"bytes_stored":{"type":"number","example":3426},"uuid":{"type":"number","example":632},"msgs_total":{"type":"number","example":6264},"publish":{"type":"number","example":4873},"subscribe_msgs":{"type":"number","example":6623},"history_msgs":{"type":"number","example":1435},"files_msgs":{"type":"number","example":23426},"files_storage":{"type":"number","example":53687091200},"files_transfer":{"type":"number","example":10737418240},"push_msgs":{"type":"number","example":990087},"mtd_uuid":{"type":"number","example":156433},"channel":{"type":"number","example":2346}},"required":["txn_total","replicated","signals","edge","message_actions","executions","bytes_stored","uuid","msgs_total","publish","subscribe_msgs","history_msgs","files_msgs","files_storage","files_transfer","push_msgs","mtd_uuid","channel"]},"UsageSeriesResponse":{"type":"object","properties":{"title":{"type":"string","example":"Audit"},"metric":{"type":"string","example":"accessmanager_audits_transactions"},"values":{"type":"array","items":{"$ref":"#/components/schemas/MetricApiValue"}},"tooltip":{"type":"string","example":"The number of transactions generated that are not charged for, e.g. Fire() and Time()"}},"required":["title","metric","values","tooltip"]},"HourlyResponse":{"type":"object","properties":{"charts":{"type":"array","items":{"$ref":"#/components/schemas/Chart"}}},"required":["charts"]},"Last24hStatsTXNResponse":{"type":"object","properties":{"chartSeries":{"type":"array","items":{"$ref":"#/components/schemas/MetricApiResponse"}},"txn_total":{"type":"number","example":4214},"replicated":{"type":"number","example":3241},"edge":{"type":"number","example":2346},"free":{"type":"number","example":2346}},"required":["chartSeries","txn_total","replicated","edge","free"]},"Last24hStatsMAUResponse":{"type":"object","properties":{"chartSeries":{"type":"array","items":{"$ref":"#/components/schemas/MetricApiResponse"}},"uuid":{"type":"number","example":4214},"msgs_total":{"type":"number","example":6264},"errors":{"type":"number","example":2346},"channel":{"type":"number","example":2346}},"required":["chartSeries","uuid","msgs_total","errors","channel"]},"CustomMetricsResponseDoc":{"type":"object","properties":{"metrics":{"type":"object","example":[{"publish":{"2024-04-03":1234,"2024-04-04":1567,"2024-04-05":2134},"subscribe_msgs":{"2024-04-03":5678,"2024-04-04":6234,"2024-04-05":7890}},{"mtd_uuid":{"2024-04-30":20480259}}],"description":"Metrics data organized by metric name and date. Each key is a metric name, and its value is an object with date keys (YYYY-MM-DD) and numeric values."}},"required":["metrics"]}},"responses":{"EntityClassesResponse":{"description":"Successful response","content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassesEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"CreateEntityClassResponse":{"description":"Entity class created successfully","headers":{"Location":{"description":"URI of the created entity class","style":"SIMPLE","explode":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}},"content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"EntityClassResponse":{"description":"Successful response","content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"RelationshipClassesResponse":{"description":"Successful response","content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassesEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"CreateRelationshipClassResponse":{"description":"Relationship class created successfully","headers":{"Location":{"description":"URI of the created relationship class","style":"SIMPLE","explode":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}},"content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"RelationshipClassResponse":{"description":"Successful response","content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"BadRequestResponse":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"UnauthorizedResponse":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"ForbiddenResponse":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"NotAcceptableResponse":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"TooManyRequestsResponse":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"InternalServerErrorResponse":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"ServiceUnavailableResponse":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}},"NotFoundResponse":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"BadRequestEntityClassWriteResponse":{"description":"Bad request. For entity class create and replace, which validate projections and, when the\nclass extends a parent, inherited property compatibility.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0003` | INVALID_JSON | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | Body, path variable or query parameter failed validation. |\n| `DS-0006` | INVALID_ARGUMENT | Neither `config` nor `extends` supplied, or `extends` targets a class at the same or a lower class level. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | A projection name is too long, malformed, or a property declares an empty projection list. |\n| `DS-0903` | INCOMPATIBLE_CHILD_PROPERTY | A redeclared inherited property differs from the parent in `path`, `valueKind`, or `nullable`. `path` is the property name. Entity classes only. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | A property shadows a built-in record field. `status` may be declared only at `/status` to control projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | The class name is reserved (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"IncompatibleChildProperty":{"$ref":"#/components/examples/IncompatibleChildProperty","valueSetFlag":false},"ProjectionLimitExceeded":{"$ref":"#/components/examples/ProjectionLimitExceeded","valueSetFlag":false},"InvalidProjectionName":{"$ref":"#/components/examples/InvalidProjectionName","valueSetFlag":false},"ReservedPropertyName":{"$ref":"#/components/examples/ReservedPropertyName","valueSetFlag":false},"ReservedClassName":{"$ref":"#/components/examples/ReservedClassName","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false},"InvalidJson":{"$ref":"#/components/examples/InvalidJson","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false}},"exampleSetFlag":false}}},"ForbiddenClassModificationResponse":{"description":"Forbidden. Adds the global class guard, which applies to class replace and delete.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, or the authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, or its projection does not permit the requested fields. |\n| `DS-0900` | GLOBAL_CLASS_MODIFICATION | The target class is a global class definition, which is read-only. Applies to replace and delete only. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"GlobalClassModification":{"$ref":"#/components/examples/GlobalClassModification","valueSetFlag":false},"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false}},"exampleSetFlag":false}}},"PreconditionFailedResponse":{"description":"Precondition Failed.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0300` | ETAG_MISMATCH | The `If-Match` header does not contain the resource's current ETag. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ETagMismatch":{"$ref":"#/components/examples/ETagMismatch","valueSetFlag":false}},"exampleSetFlag":false}}},"UnsupportedMediaTypeResponse":{"description":"Unsupported Media Type.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0007` | UNSUPPORTED_CONTENT_TYPE | The request `Content-Type` is not supported by this operation. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"UnsupportedContentType":{"$ref":"#/components/examples/UnsupportedContentType","valueSetFlag":false}},"exampleSetFlag":false}}},"ConflictResponse":{"description":"Conflict.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0301` | CONFLICT | A resource with the same identity already exists. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Conflict":{"$ref":"#/components/examples/Conflict","valueSetFlag":false}},"exampleSetFlag":false}}},"DeleteSuccessResponse":{"description":"Resource deleted successfully"},"BadRequestRelationshipClassWriteResponse":{"description":"Bad request. For relationship class create and replace. Relationship classes cannot be\nsubclassed, so no inheritance error applies.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0003` | INVALID_JSON | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | Body, path variable or query parameter failed validation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter or body value could not be used. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | A projection name is too long, malformed, or a property declares an empty projection list. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | A property shadows a built-in record field. `status` may be declared only at `/status` to control projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | The class name is reserved (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ProjectionLimitExceeded":{"$ref":"#/components/examples/ProjectionLimitExceeded","valueSetFlag":false},"InvalidProjectionName":{"$ref":"#/components/examples/InvalidProjectionName","valueSetFlag":false},"ReservedPropertyName":{"$ref":"#/components/examples/ReservedPropertyName","valueSetFlag":false},"ReservedClassName":{"$ref":"#/components/examples/ReservedClassName","valueSetFlag":false},"InvalidJson":{"$ref":"#/components/examples/InvalidJson","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}}},"parameters":{"EntityClassPath":{"name":"entityClass","in":"path","description":"Name of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},"EntityClassVersionPath":{"name":"entityClassVersion","in":"path","description":"Version of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},"RelationshipClassPath":{"name":"relationshipClass","in":"path","description":"Name of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},"RelationshipClassVersionPath":{"name":"relationshipClassVersion","in":"path","description":"Version of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},"SubKeyPath":{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},"EntityClassLevelQuery":{"name":"entity_class_level","in":"query","description":"Level of the entity class.","required":false,"schema":{"$ref":"#/components/schemas/ClassLevel","exampleSetFlag":false}},"IfMatchHeader":{"name":"If-Match","in":"header","description":"ETag value for optimistic concurrency control. If provided, the update will only succeed if the current resource ETag matches this value.","required":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}},"examples":{"BadRequest":{"summary":"DS-0002 BAD_REQUEST - required header or query parameter missing","value":{"errors":[{"errorCode":"DS-0002","message":"Required request parameter 'relationship_class' is missing"}]},"valueSetFlag":true},"ValidationError":{"summary":"DS-0004 VALIDATION_ERROR - one item per failing field","value":{"errors":[{"errorCode":"DS-0004","message":"must not be blank","path":"id"},{"errorCode":"DS-0004","message":"size must be between 1 and 100","path":"status"}]},"valueSetFlag":true},"InvalidArgument":{"summary":"DS-0006 INVALID_ARGUMENT - unusable parameter value","value":{"errors":[{"errorCode":"DS-0006","message":"Unknown sort fields: '[nickname]'. Known sortable fields: [createdAt, id, name, status, updatedAt]","path":"sort"}]},"valueSetFlag":true},"Unauthenticated":{"summary":"DS-0203 UNAUTHENTICATED - no credentials supplied","value":{"errors":[{"errorCode":"DS-0203","message":"Authentication required: provide either a PAM token via 'auth' parameter or a request signature."}]},"valueSetFlag":true},"DatasyncNotEnabled":{"summary":"DS-0200 DATASYNC_NOT_ENABLED - feature not enabled on the keyset","value":{"errors":[{"errorCode":"DS-0200","message":"Datasync not enabled for this subscribe key"}]},"valueSetFlag":true},"AccessDenied":{"summary":"DS-0201 ACCESS_DENIED - credentials recognised but not permitted","value":{"errors":[{"errorCode":"DS-0201","message":"Access Manager is not enabled for this subscribe key. Please contact PubNub Support."}]},"valueSetFlag":true},"InvalidToken":{"summary":"DS-0202 INVALID_TOKEN - PAM token unparseable or projection not permitted","value":{"errors":[{"errorCode":"DS-0202","message":"Invalid value for 'auth' parameter"}]},"valueSetFlag":true},"InvalidTokenGrantPattern":{"summary":"DS-0202 INVALID_TOKEN - a grant pattern in the token is too complex to evaluate","value":{"errors":[{"errorCode":"DS-0202","message":"Grant pattern '(a+)+\\1b' is too complex to evaluate","path":"auth"}]},"valueSetFlag":true},"InternalServerError":{"summary":"DS-0000 INTERNAL_SERVER_ERROR","value":{"errors":[{"errorCode":"DS-0000","message":"Internal server error"}]},"valueSetFlag":true},"ServiceUnavailable":{"summary":"DS-0009 SERVICE_UNAVAILABLE - upstream dependency unavailable","value":{"errors":[{"errorCode":"DS-0009","message":"Service temporarily unavailable"}]},"valueSetFlag":true},"NotFound":{"summary":"DS-0100 NOT_FOUND - addressed resource does not exist","value":{"errors":[{"errorCode":"DS-0100","message":"Entity not found: user-42"}]},"valueSetFlag":true},"ConfigNotFound":{"summary":"DS-0600 CONFIG_NOT_FOUND - subscribe key unknown to configuration service","value":{"errors":[{"errorCode":"DS-0600","message":"Resource not found"}]},"valueSetFlag":true},"IncompatibleChildProperty":{"summary":"DS-0903 INCOMPATIBLE_CHILD_PROPERTY - child redeclares an inherited property incompatibly","value":{"errors":[{"errorCode":"DS-0903","message":"Property 'name' incompatible with parent: valueKind must be 'STRING' but was 'NUMBER'","path":"name"}]},"valueSetFlag":true},"ProjectionLimitExceeded":{"summary":"DS-0901 PROJECTION_LIMIT_EXCEEDED","value":{"errors":[{"errorCode":"DS-0901","message":"Too many distinct projections: 4. Maximum is 3."}]},"valueSetFlag":true},"InvalidProjectionName":{"summary":"DS-0902 INVALID_PROJECTION_NAME","value":{"errors":[{"errorCode":"DS-0902","message":"Projection name 'bad name!' must be alphanumeric (hyphens and underscores allowed) or '__default__'"}]},"valueSetFlag":true},"ReservedPropertyName":{"summary":"DS-0906 RESERVED_PROPERTY_NAME - property shadows a built-in record field","value":{"errors":[{"errorCode":"DS-0906","message":"Property name 'createdAt' is reserved for a built-in record field and cannot be used as a custom property name"}]},"valueSetFlag":true},"ReservedClassName":{"summary":"DS-0907 RESERVED_CLASS_NAME - class name is reserved for a Global class","value":{"errors":[{"errorCode":"DS-0907","message":"Class name 'User' is reserved for a built-in Global class and cannot be used as a custom class name"}]},"valueSetFlag":true},"InvalidJson":{"summary":"DS-0003 INVALID_JSON - body absent or unparseable","value":{"errors":[{"errorCode":"DS-0003","message":"Malformed request body: could not parse JSON"}]},"valueSetFlag":true},"GlobalClassModification":{"summary":"DS-0900 GLOBAL_CLASS_MODIFICATION - global class definitions are read-only","value":{"errors":[{"errorCode":"DS-0900","message":"Cannot modify global class definition 'User'"}]},"valueSetFlag":true},"ETagMismatch":{"summary":"DS-0300 ETAG_MISMATCH - If-Match did not match the current ETag","value":{"errors":[{"errorCode":"DS-0300","message":"ETag mismatch: provided ETag '3' does not match current version"}]},"valueSetFlag":true},"UnsupportedContentType":{"summary":"DS-0007 UNSUPPORTED_CONTENT_TYPE","value":{"errors":[{"errorCode":"DS-0007","message":"Content type text/plain is not supported"}]},"valueSetFlag":true},"Conflict":{"summary":"DS-0301 CONFLICT - resource already exists","value":{"errors":[{"errorCode":"DS-0301","message":"Entity class 'Product' with version 1 already exists"}]},"valueSetFlag":true}},"requestBodies":{},"headers":{},"securitySchemes":{"API-Key":{"type":"apiKey","in":"header","name":"Authorization","description":"API Key issued for Service Integration. To generate one, visit https://admin.pubnub.com/service-integrations"},"bearerAuth":{"type":"http","description":"JWT token provided by the API Gateway","scheme":"bearer","bearerFormat":"JWT"},"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"apiKey","name":"x-session-token","in":"header"}},"links":{},"callbacks":{}},"paths":{"/v2/illuminate/business-objects":{"get":{"description":"Returns a list of all business objects for your account.","operationId":"AdminApiBusinessObjectController_list","parameters":[{"name":"customerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"isCustomer","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BusinessObject"}}}}}},"summary":"List business objects","tags":["Illuminate"]},"post":{"description":"Creates a new business object to capture and organize event data.\n\nBusiness Objects are created with `isActive: false` by default, allowing you to configure fields before activation. At least one subscribe key in the `subkeys` array is required to activate a Business Object.\n\n### Key IDs to save from the response\n\nThe response includes auto-generated IDs you will need for downstream resources: \n\n| Response field | Used by |\n|---|---|\n| `id` (top-level) | `businessObjectId` when creating metrics, decisions, or queries |\n| `fields[].id` | `measureId` and `dimensionIds` when creating metrics; `inputFields[].sourceId` when creating decisions |\n\n> **Note:** Omit `id` on fields when creating — the API auto-generates them. You must include field `id` values in subsequent PUT requests for existing fields.\n\n### Field source conditional requirements \n\n| `source` | Required fields | Notes |\n|---|---|---|\n| `JSONPATH` | `jsonPath`, `jsonFieldType` | `jsonPath` is required when `isActive` is `true`. |\n| `DERIVED` | `derivation` object | Must include `operation: \"TIME_DIFF\"` and `params` (startSource, endSource, etc.) |\n\n### Field type limits\n\n- `TEXT_LONG` fields (up to 1,000 characters) are limited to **5 per Business Object**. Use `TEXT` (default 256-char limit) unless you need longer values.\n- Maximum **100 fields** per Business Object.","operationId":"AdminApiBusinessObjectController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessObjectDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessObject"}}}}},"summary":"Create business object","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/business-objects/{id}":{"get":{"description":"Returns details for a specific business object.","operationId":"AdminApiBusinessObjectController_get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessObject"}}}},"404":{"description":""}},"summary":"Get business object","tags":["Illuminate"]},"put":{"description":"Updates an existing business object.\n\n> **Warning:** While `isActive: true`, you can change **only** `name` and `description`. To add or remove fields, set `isActive: false` first.\n\n> **Warning:** Deactivating a Business Object pauses data collection immediately. Any active decisions using this Business Object must be deactivated first.\n\n### Field behavior on PUT\n\n| Field | PUT behavior |\n|---|---|\n| `fields[].id` | **Required** for existing fields — omitting an existing field deletes it. Omit `id` only for new fields being added. |\n| `isActive` | Set to `false` to deactivate; set to `true` to re-activate (requires at least one `subkey`) |\n| `subkeys` | Must have at least one entry to set `isActive: true` |\n\n### Common errors\n\n| Code | Condition |\n|---|---|\n| 400 | Modifying fields while `isActive: true` |\n| 400 | Setting `isActive: true` with empty `subkeys` array |\n| 400 | Deactivating while associated decisions are still active |","operationId":"AdminApiBusinessObjectController_edit","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessObjectEditDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessObject"}}}},"404":{"description":""}},"summary":"Update business object","tags":["Illuminate"]},"delete":{"description":"Deletes a business object and all associated metrics, decisions, and charts.\n\n> **Warning: Cascading deletion.** This permanently deletes the Business Object and **all** dependent resources — metrics, decisions, dashboard charts, and queries that reference it.","operationId":"AdminApiBusinessObjectController_delete","parameters":[],"responses":{"200":{"description":""},"404":{"description":""}},"summary":"Delete business object","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/business-objects/json-path-validation":{"post":{"description":"Validates a JSON path expression for field extraction.","operationId":"AdminApiBusinessObjectController_validateJsonPath","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonPathValidationDto"}}}},"responses":{"200":{"description":""}},"summary":"Validate JSON path","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/metrics":{"get":{"description":"Returns a list of all metrics for your account.","operationId":"AdminApiMetricController_list","parameters":[{"name":"customerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"isCustomer","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Metric"}}}}}},"summary":"List metrics","tags":["Illuminate"]},"post":{"description":"Creates a new metric for data aggregation. A metric defines an aggregation function applied to business object fields over a time window.\n\n### `measureId` conditional requirement\n\n| Function | `measureId` | Field type |\n|---|---|---|\n| `COUNT`, `COUNT_DISTINCT` | **Omit** — these count occurrences, no field needed | N/A |\n| `AVG`, `MAX`, `MIN`, `SUM` | **Required** — must reference a `NUMERIC` field from the Business Object | `jsonFieldType: \"NUMERIC\"` |\n\n`dimensionIds` reference `TEXT` fields used for grouping (e.g., group by user or region). `filters[].sourceId` references a field from the Business Object.\n\n> **Note:** The `filters[].id` field is auto-generated on create. Include it in subsequent PUT requests when updating filters.\n\n### `evaluationWindow` allowed values\n\nOnly the following values (in seconds) are accepted — arbitrary values will be rejected:\n\n| Value | Duration |\n|---|---|\n| `60` | 1 minute |\n| `300` | 5 minutes |\n| `600` | 10 minutes |\n| `900` | 15 minutes |\n| `1800` | 30 minutes |\n| `3600` | 1 hour |\n| `86400` | 1 day |","operationId":"AdminApiMetricController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metric"}}}}},"summary":"Create metric","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/metrics/{id}":{"get":{"description":"Returns details for a specific metric.","operationId":"AdminApiMetricController_get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metric"}}}},"404":{"description":""}},"summary":"Get metric","tags":["Illuminate"]},"put":{"description":"Updates an existing metric.\n\n> **Warning:** All associated decisions must be deactivated before updating a metric. The API rejects updates if any referencing decision has `enabled: true`.\n\n> **Note:** Changing the `function` type may require adding or removing `measureId`. For example, switching from `COUNT` to `AVG` requires adding a `measureId` referencing a `NUMERIC` field.\n\n### Field behavior on PUT\n\n| Field | PUT behavior |\n|---|---|\n| `filters[].id` | **Required** for existing filters — omit only for new filters being added |\n| `measureId` | Include if function requires it; omit if switching to `COUNT`/`COUNT_DISTINCT` |","operationId":"AdminApiMetricController_edit","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metric"}}}},"404":{"description":""}},"summary":"Update metric","tags":["Illuminate"]},"delete":{"description":"Deletes a metric and any associated decisions.\n\n> **Warning: Cascading deletion.** Deleting a metric also permanently deletes all decisions that reference it.","operationId":"AdminApiMetricController_delete","parameters":[],"responses":{"200":{"description":""},"404":{"description":""}},"summary":"Delete metric","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/decisions":{"get":{"description":"Returns a list of all decisions for your account.","operationId":"AdminApiDecisionController_list","parameters":[{"name":"customerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"isCustomer","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}}}}}},"summary":"List decisions","tags":["Illuminate"]},"post":{"description":"Creates a new decision for configuring rules, conditions, and actions based on events, metrics, or queries.\n\n> **Warning:** The `rules` array **must be empty `[]`** on POST. The server rejects decisions that include populated rules during creation. Rules are added in a subsequent PUT request.\n\n> **Warning:** The decision **must be created with `enabled: false`**. You cannot set `enabled: true` until rules are configured via PUT.\n\n### Creation workflow\n\nDecisions require a multi-step creation process:\n\n1. **POST /v2/decisions** — Create the decision with `inputFields`, `outputFields`, `actions`, and `rules: []`. Omit `id` on all sub-objects — the API auto-generates them.\n2. **Read the POST response** — Extract the auto-generated IDs: `inputFields[].id`, `outputFields[].id`, and `actions[].id`.\n3. **PUT /v2/decisions/{id}** — Send the full decision body including `rules` that reference those IDs via `inputValues[].inputFieldId`, `outputValues[].outputFieldId`, and `actionValues[].actionId`.\n4. **PUT /v2/decisions/{id}** — Set `enabled: true` to activate (optionally set `activeFrom`/`activeUntil` for scheduled activation).\n\n### Source type behavior\n\n| `sourceType` | `inputFields` | `executionFrequency` |\n|---|---|---|\n| `BUSINESSOBJECT` | Required — define manually with `sourceType: \"FIELD\"` | Not used |\n| `METRIC` | Auto-populated from the metric — do **not** include | Required |\n| `QUERY` | Auto-populated from the query — do **not** include | Required |\n\n### Action template schemas\n\nThe `template` object shape depends on `actionType`:\n\n| `actionType` | Template fields |\n|---|---|\n| `PUBNUB_PUBLISH` | `pubkey`, `subkey`, `channel`, `body`, `meta` |\n| `WEBHOOK_EXECUTION` | `webhookUrl`, `headers`, `payload` |\n| `APPCONTEXT_SET_USER_METADATA` | `userId`, `custom` |\n| `APPCONTEXT_SET_CHANNEL_METADATA` | `channelId`, `custom` |\n| `APPCONTEXT_SET_MEMBERSHIP_METADATA` | `userId`, `channelId`, `custom` |\n\nTemplate values support `${variable}` interpolation using output field variable names or input field IDs.\n\n### Common errors\n\n| Code | Condition |\n|---|---|\n| 400 | Non-empty `rules` array on POST |\n| 400 | `enabled: true` on POST |\n| 400 | `inputFields` included when `sourceType` is `METRIC` or `QUERY` |\n| 400 | Missing `executionFrequency` when `sourceType` is `METRIC` or `QUERY` |","operationId":"AdminApiDecisionController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}}},"summary":"Create decision","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/decisions/{id}":{"get":{"description":"Returns details for a specific decision.","operationId":"AdminApiDecisionController_get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"404":{"description":""}},"summary":"Get decision","tags":["Illuminate"]},"put":{"description":"Updates an existing decision. This is a **full replacement** — any fields, rules, or actions omitted from the PUT body will be deleted.\n\n> **Warning:** All rule references (`inputFieldId`, `outputFieldId`, `actionId`) must use the auto-generated IDs returned from the POST response — not user-defined values.\n\n> **Warning:** This endpoint performs a full replace. Include **all** existing fields, actions, and rules in every PUT request, even if you are only changing one rule.\n\n### What requires deactivation\n\n| Change type | Deactivation required? |\n|---|---|\n| Modifying rule values (conditions, outputs, action status) | No |\n| Adding or removing `inputFields`, `outputFields`, or `actions` | **Yes** — set `enabled: false` first |\n| Changing `name`, `description`, `activeFrom`, `activeUntil` | No |\n| Setting `enabled: true` | No (this is how you activate) |\n\n### Field behavior on PUT\n\n| Field | PUT behavior |\n|---|---|\n| `id` (top-level) | Path parameter — do not include in body |\n| `rules` | Include the full rules array with ID references from POST response |\n| `inputFields[].id` | Must match the auto-generated IDs — include them |\n| `actions[].id` | Must match the auto-generated IDs — include them |\n| `enabled` | Set `true` to activate, `false` to deactivate |\n\n### Common errors\n\n| Code | Condition |\n|---|---|\n| 400 | Rule references an `inputFieldId` that does not exist |\n| 400 | Structural change (inputFields/outputFields/actions) while `enabled: true` |\n| 404 | Decision ID not found |","operationId":"AdminApiDecisionController_edit","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionEditDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"404":{"description":""}},"summary":"Update decision","tags":["Illuminate"]},"delete":{"description":"Deletes a decision and removes its rules and actions permanently.\n\n> **Note:** This is irreversible. All rules, actions, and execution history for this decision will be permanently deleted.","operationId":"AdminApiDecisionController_delete","parameters":[],"responses":{"200":{"description":""},"404":{"description":""}},"summary":"Delete decision","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/decisions/{id}/action-data":{"post":{"description":"Retrieves aggregated action execution counts for a decision within a date range.\n\n### Request body\n\n| Field | Required | Description |\n|---|---|---|\n| `startDate` | Yes | ISO 8601 UTC timestamp |\n| `endDate` | Yes | ISO 8601 UTC timestamp (must be after `startDate`) |\n| `utcOffsetSec` | No | Timezone offset in seconds (default `0`). Shifts aggregation bucket boundaries. |\n| `aggregationWindow` | No | Bucket size in seconds (e.g. `3600` for hourly). Omit for a single aggregated total. |\n\n### Response\n\nReturns time-bucketed counts of action executions (successes and failures) for each action in the decision. Use this for dashboarding action throughput over time.","operationId":"AdminApiDecisionController_getActionData","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionDataQuery"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionData"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionData"}}}}},"summary":"Get action data","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/decisions/{id}/action-log":{"get":{"description":"Retrieves historical action execution logs for a decision. All parameters are **query strings** — no request body.\n\n### Pagination & limits\n\n- **No date range:** Returns the 50 most recent records.\n- **With date range:** Up to 10,000 records. Use `limit` and `page` for pagination.\n\n### Query parameters\n\n| Parameter | Type | Default | Description |\n|---|---|---|---|\n| `format` | string | `json` | `json` or `csv` |\n| `startDate` | string | — | ISO 8601 UTC (no milliseconds), e.g. `2025-10-01T00:00:00Z` |\n| `endDate` | string | — | ISO 8601 UTC (must be after `startDate`) |\n| `success` | boolean | — | Filter by success/failure. Omit to return all. |\n| `search` | string | — | Case-insensitive, max 256 chars. Searches `actionName`, `errorMessage`, `triggeringConditions`, `outputValues`. |\n| `sort` | string | `timestamp:desc` | Format: `column:direction`. Sortable: `actionName`, `actionType`, `errorMessage`, `success`, `timestamp`. |\n| `limit` | number | `50` | Records per page |\n| `page` | number | `1` | Page number |\n\n> **Note:** All timestamps in the response are UTC, ISO 8601 without milliseconds.","operationId":"AdminApiDecisionController_getActionLog","parameters":[{"name":"format","required":false,"in":"query","description":"Response format: JSON or CSV. Defaults to JSON.","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start of date range in UTC (ISO 8601 without milliseconds). If not provided, returns most recent 50 records.","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End of date range in UTC. Must be after startDate.","schema":{"type":"string"}},{"name":"success","required":false,"in":"query","description":"Filter by success status. Must be true or false. If not specified, returns all statuses.","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search term to filter results (max 256 characters). Case-insensitive search on actionName, errorMessage, triggeringConditions, and outputValues.","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Sort order in format column:direction (e.g., timestamp:desc). Sortable columns: actionName, actionType, errorMessage, success, timestamp. Default: timestamp:desc.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return.","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Retrieve action log","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/decisions/{id}/action-limit-reset":{"post":{"description":"Resets action execution limits so actions can fire again after hitting their `executionLimitType` cap. Useful for debugging and testing.\n\n### Two modes\n\n| Mode | How to use |\n|---|---|\n| **Selective** | Send a `ruleActions` array with `{ ruleId, actionId }` pairs to reset specific actions |\n| **All** | Add `?all=true` query parameter (no request body needed) |\n\n### Where to find the IDs\n\n- `ruleId` — from `rules[].id` in the `GET /v2/decisions/{id}` response.\n- `actionId` — from `actions[].id` in the same response.\n\n> **Tip:** After resetting, the next evaluation cycle that matches rule conditions will re-trigger the action as if it had never executed.","operationId":"AdminApiDecisionController_resetActionLimit","parameters":[{"name":"all","required":false,"in":"query","description":"Reset all action limits for the decision.","schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetActionLimitListDto"}}}},"responses":{"200":{"description":""}},"summary":"Reset action limits","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/dashboards":{"get":{"description":"Returns a list of all dashboards for your account.","operationId":"AdminApiDashboardController_list","parameters":[{"name":"customerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"isCustomer","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Dashboard"}}}}}},"summary":"List dashboards","tags":["Illuminate"]},"post":{"description":"Creates a new dashboard to visualize metrics with optional decision overlays.\n\n### Conditional fields\n\n| Field | Condition |\n|---|---|\n| `startDate` | Required when `dateRange` is `\"Custom date\"` |\n| `endDate` | Required when `dateRange` is `\"Custom date\"` |\n| `customerId` | Can only be set on create (not updatable). Requires Partner Portal. |\n\nEach chart in the `charts` array references a metric by `{ id: \"metric-uuid\" }` and can optionally overlay decisions via `decisionIds`.","operationId":"AdminApiDashboardController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}}},"summary":"Create dashboard","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/dashboards/{id}":{"get":{"description":"Returns details for a specific dashboard.","operationId":"AdminApiDashboardController_get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":""}},"summary":"Get dashboard","tags":["Illuminate"]},"put":{"description":"Updates an existing dashboard. Same request body as create.\n\n> **Warning:** The `charts` array is a **full replacement**. Omitting a chart from the array deletes it. To keep existing charts, include them with their `charts[].id`.\n\n### Field behavior on PUT\n\n| Field | Behavior |\n|---|---|\n| `name` | Replaced |\n| `dateRange` | Replaced |\n| `startDate` / `endDate` | Required when `dateRange` is `\"Custom date\"` |\n| `charts` | Full replacement — include `id` for existing charts |\n| `customerId` | **Cannot be changed** after creation |\n\n### Common errors\n\n| Status | Cause |\n|---|---|\n| `400` | Missing `charts[].id` for an existing chart (creates duplicate instead of updating) |\n| `404` | Dashboard ID does not exist |","operationId":"AdminApiDashboardController_edit","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardEditDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":""}},"summary":"Update dashboard","tags":["Illuminate"]},"delete":{"description":"Deletes a dashboard. Only removes the visualization; metrics and decisions remain.\n\n> **Note:** This deletes only the dashboard and its chart configuration. The underlying metrics and decisions are **not** affected.","operationId":"AdminApiDashboardController_delete","parameters":[],"responses":{"200":{"description":""},"404":{"description":""}},"summary":"Delete dashboard","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/queries/execute":{"post":{"description":"Executes a query definition without saving it. Use this to preview results before creating a saved query, dashboard, or decision.\n\n### Pipeline structure\n\nThe query `pipeline` follows a three-stage model:\n\n1. **Sources** — Define where data comes from (`businessObject` or `reference`). Each source specifies fields, time ranges, and filters.\n2. **Transforms** — Optional processing steps: `aggregate`, `window`, `join`, `dedupe`, `calculate`, `unnest`, `filter_join`. Each transform references an `input` (a source `id` or previous transform `id`).\n3. **Output** — Specifies which stage to return results from (`from`), which fields to `select`, sorting (`orderBy`), and pagination (`limit`/`offset`).\n\n### Conditional requirements\n\n| Field | Condition |\n|---|---|\n| `source.businessObjectId` | Required when `source.type` is `businessObject` |\n| `source.referenceId` | Required when `source.type` is `reference` |\n| `timeRange.relative` / `timeRange.absolute` | Mutually exclusive — specify only one |","operationId":"executeQuery","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequestDto"}}}},"responses":{"200":{"description":"Query executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseDto"}}}},"400":{"description":"Invalid query request structure or parameters"},"404":{"description":"Business object not found"}},"summary":"Execute query","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/queries":{"get":{"description":"Returns a list of all saved queries for your account.","operationId":"listQueries","parameters":[{"name":"customerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"isCustomer","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Query"}}}}}},"summary":"List queries","tags":["Illuminate"]},"post":{"description":"Creates and saves a query definition for reuse in dashboards and decisions.\n\n### Request body structure\n\nUnlike ad-hoc execute (where `pipeline` is at the top level), saved queries wrap the pipeline inside a `definition` object:\n\n| Field | Required | Description |\n|---|---|---|\n| `name` | Yes | Query name (max 255 characters) |\n| `description` | No | Description (max 1000 characters) |\n| `definition` | Yes | Contains `version`, `pipeline`, and optional `meta` — same structure as the ad-hoc execute request body |\n| `customerId` | No | OEM customer scope (nullable). Can only be set on create — not updatable. |\n\n### Key IDs from the response\n\nSave the response `id` — you will need it for:\n- `PUT /v2/queries/{id}` — update the query\n- `POST /v2/queries/{id}/execute` — execute the saved definition\n- `GET /v2/queries/{id}/fields` — list output fields for dashboard/decision configuration\n- `POST /v2/queries/{id}/predefined-decisions` — create a decision from this query","operationId":"createQuery","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Query"}}}}},"summary":"Create query","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/queries/{id}":{"get":{"description":"Returns details for a specific saved query, including the full definition.","operationId":"getQuery","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Query"}}}},"404":{"description":""}},"summary":"Get query","tags":["Illuminate"]},"put":{"description":"Updates an existing saved query. Accepts the same request body as create (`name`, `description`, `definition`).\n\n> **Warning:** This is a full replacement — the entire `definition` is replaced, not merged. Always send the complete definition, even for unchanged portions.\n\n### Downstream impact\n\n- Dashboards and decisions that reference this query will use the **new** definition on their next execution.\n- If a decision is actively using this query, changing the pipeline schema (different output field names or types) can break rule references. Deactivate the decision first.\n- `customerId` cannot be changed after creation.","operationId":"updateQuery","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Query"}}}},"404":{"description":""}},"summary":"Update query","tags":["Illuminate"]},"delete":{"description":"Deletes a saved query.\n\n> **Warning:** Dashboards or decisions that were built from this query will no longer be able to load the query definition. Those resources are **not** deleted, but may stop functioning correctly.","operationId":"deleteQuery","parameters":[],"responses":{"200":{"description":""},"404":{"description":""}},"summary":"Delete query","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/queries/{id}/execute":{"post":{"description":"Executes a previously saved query by ID and returns the result set.\n\n### Usage\n\n- **No request body required** — send `POST` with an empty body or `{}`.\n- The saved definition is used as-is. To customize parameters (e.g. different time range), use the ad-hoc execute endpoint instead.\n\n### Response shape\n\nIdentical to ad-hoc execute:\n\n| Field | Type | Description |\n|---|---|---|\n| `data` | array | Result rows |\n| `executionTime` | number | Execution duration in milliseconds |\n| `queryDefinition` | object | The saved definition echoed back |","operationId":"executeSavedQuery","parameters":[],"responses":{"200":{"description":"Saved query executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseDto"}}}},"400":{"description":"Invalid query request structure or parameters"},"404":{"description":"Query not found"}},"summary":"Execute saved query","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/queries/{id}/predefined-decisions":{"post":{"description":"Creates a predefined decision scaffolded from this query's output fields.\n\n### Usage\n\n- **No request body** — send `POST` with an empty body.\n- The resulting decision has `sourceType: \"QUERY\"` and `enabled: false`.\n\n### What gets auto-populated\n\n| Field | Populated from |\n|---|---|\n| `inputFields` | Query output fields with `sourceType: \"QUERYFIELD\"` |\n| `outputFields` | Predefined output schema |\n| `actions` | Default action templates |\n| `rules` | Empty rule set ready for configuration |\n\n### Next steps\n\n1. `GET /v2/decisions/{id}` to review the scaffolded decision.\n2. `PUT /v2/decisions/{id}` to configure rules, customize actions, and set `enabled: true`.\n3. See the Decisions API for the full update schema.","operationId":"createPredefinedDecisionForQuery","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePredefinedDecisionDto"}}}},"responses":{"201":{"description":"Predefined decision created successfully for the query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"400":{"description":"Invalid request parameters or query cannot have decision created"},"404":{"description":"Query not found"}},"summary":"Create predefined decision for query","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/queries/{id}/fields":{"get":{"description":"Returns the list of output fields produced by this saved query. Use these to configure downstream resources.\n\n### Response\n\nArray of objects with:\n\n| Field | Type | Description |\n|---|---|---|\n| `field` | string | The output column name |\n| `alias` | string | Display alias (may differ from `field` if the pipeline renamed it) |\n| `id` | string | Unique field identifier |\n\n### Where to use these IDs\n\n- **Decisions** — use `id` as `inputFields[].sourceId` when creating a decision from this query.\n- **Dashboards** — use `id` when configuring chart `dimensionIds` and `measureIds`.","operationId":"getQueryFields","parameters":[],"responses":{"200":{"description":"Query select fields retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OutputSelectDto"}}}}},"404":{"description":"Query not found"}},"summary":"Get query fields","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/illuminate/keysets":{"get":{"description":"Returns Illuminate-enabled keysets for the account.","operationId":"listIlluminateKeysets","parameters":[{"name":"customerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"isCustomer","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Keyset"}}}}}},"summary":"List Illuminate keysets","tags":["Illuminate"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/scheduled/events/{scheduledEventId}":{"get":{"tags":["Scheduled Events"],"summary":"Get a scheduled event","description":"Returns a single scheduled event by ID. **Permissions:** `functions.package-deployment:read` on `keyset`","operationId":"scheduledEventGet","parameters":[{"name":"scheduledEventId","in":"path","description":"UUID of the scheduled event.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledEventDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"tags":["Scheduled Events"],"summary":"Update a scheduled event","description":"Updates an existing scheduled event. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"scheduledEventUpdate","parameters":[{"name":"scheduledEventId","in":"path","description":"UUID of the scheduled event.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledEventUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledEventDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Scheduled Events"],"summary":"Delete a scheduled event","description":"Deletes a scheduled event. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"scheduledEventDelete","parameters":[{"name":"scheduledEventId","in":"path","description":"UUID of the scheduled event.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/packages/{packageId}":{"get":{"tags":["Packages"],"summary":"Get a package","description":"Returns a single package by ID. **Permissions:** `functions.package:read` on `account`","operationId":"packageGet","parameters":[{"name":"packageId","in":"path","description":"UUID of the package.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"tags":["Packages"],"summary":"Update a package","description":"Updates the name, description, or tags of an existing package. **Permissions:** `functions.package:write` on `account`","operationId":"packageUpdate","parameters":[{"name":"packageId","in":"path","description":"UUID of the package.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Packages"],"summary":"Delete a package","description":"Deletes a package and all its revisions. The package must be stopped before deletion. **Permissions:** `functions.package:write` on `account`","operationId":"packageDelete","parameters":[{"name":"packageId","in":"path","description":"UUID of the package.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-revisions/{packageRevisionId}":{"get":{"tags":["Revisions"],"summary":"Get a package revision","description":"Returns a single package revision by ID. **Permissions:** `functions.package:read` on `account`","operationId":"packageRevisionGet","parameters":[{"name":"packageRevisionId","in":"path","description":"UUID of the package revision.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageRevisionDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"tags":["Revisions"],"summary":"Update a package revision","description":"Updates the name and description of a package revision. **Permissions:** `functions.package:write` on `account`","operationId":"packageRevisionUpdate","parameters":[{"name":"packageRevisionId","in":"path","description":"UUID of the package revision.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageRevisionUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageRevisionDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Revisions"],"summary":"Delete a package revision","description":"Deletes a package revision. Fails if the revision has active deployments. **Permissions:** `functions.package:write` on `account`","operationId":"packageRevisionDelete","parameters":[{"name":"packageRevisionId","in":"path","description":"UUID of the package revision.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-deployments/{packageDeploymentId}/function-deployments":{"put":{"tags":["Deployments"],"summary":"Rolling update a deployment","description":"Performs a rolling update of a deployment. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"packageDeploymentRollingUpdate","parameters":[{"name":"packageDeploymentId","in":"path","description":"UUID of the package deployment.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentRollingUpdateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"423":{"description":"Locked — resource is in a transitional state, retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Deployments"],"summary":"Start or restart a deployment","description":"Starts or restarts a deployment. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"packageDeploymentStartOrRestart","parameters":[{"name":"packageDeploymentId","in":"path","description":"UUID of the package deployment.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"423":{"description":"Locked — resource is in a transitional state, retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Deployments"],"summary":"Stop a deployment","description":"Stops a deployment. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"packageDeploymentStop","parameters":[{"name":"packageDeploymentId","in":"path","description":"UUID of the package deployment.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"force","in":"query","description":"When true, forces the operation even if preconditions are not met.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"423":{"description":"Locked — resource is in a transitional state, retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/strings/{key}":{"get":{"tags":["KV Store"],"summary":"Get a string entry by key","description":"Returns a single string key-value entry. **Permissions:** `keyset:read` on `keyset`","operationId":"stringGet","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringKeyValueDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"tags":["KV Store"],"summary":"Create or update a string entry","description":"Inserts or updates a string key-value entry with an optional TTL. **Permissions:** `keyset:write` on `keyset`","operationId":"stringUpsert","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringUpsertRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringKeyValueDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["KV Store"],"summary":"Delete a string entry","description":"Deletes a string key-value entry by key. **Permissions:** `keyset:write` on `keyset`","operationId":"stringDelete","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/secrets/{key}":{"put":{"tags":["Secrets Storage"],"summary":"Create or update a secret","description":"Inserts or updates an encrypted secret entry. **Permissions:** `keyset:write` on `keyset`","operationId":"secretUpsert","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretUpsertRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Secrets Storage"],"summary":"Delete a secret","description":"Deletes an encrypted secret entry by key. **Permissions:** `keyset:write` on `keyset`","operationId":"secretDelete","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/jsons/{key}":{"get":{"tags":["KV Store"],"summary":"Get a JSON entry by key","description":"Returns a single JSON key-value entry. **Permissions:** `keyset:read` on `keyset`","operationId":"jsonGet","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringKeyValueDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"tags":["KV Store"],"summary":"Create or update a JSON entry","description":"Inserts or updates a JSON key-value entry with an optional TTL. **Permissions:** `keyset:write` on `keyset`","operationId":"jsonUpsert","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonUpsertRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringKeyValueDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["KV Store"],"summary":"Delete a JSON entry","description":"Deletes a JSON key-value entry by key. **Permissions:** `keyset:write` on `keyset`","operationId":"jsonDelete","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/function-revisions/{functionRevisionId}/test-inputs/{functionTestInputId}":{"put":{"tags":["Revisions"],"summary":"Update a test input","description":"Updates an existing test input for a function revision. The test input must belong to the path function revision and that revision must belong to the acting account. **Permissions:** `functions.package:write` on `account`","operationId":"functionRevisionTestInputUpdate","parameters":[{"name":"functionRevisionId","in":"path","description":"UUID of the function revision.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"functionTestInputId","in":"path","description":"UUID of the function test input.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionRevisionTestInputCreateUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionTestInputDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Revisions"],"summary":"Delete a test input","description":"Deletes a test input from a function revision. The function revision must belong to the acting account. **Permissions:** `functions.package:write` on `account`","operationId":"functionRevisionDeleteTestInput","parameters":[{"name":"functionRevisionId","in":"path","description":"UUID of the function revision.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"functionTestInputId","in":"path","description":"UUID of the function test input.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/scheduled/events":{"get":{"tags":["Scheduled Events"],"summary":"List scheduled events","description":"Returns a paginated list of scheduled events for the account. **Permissions:** `functions.package-deployment:read` on `keyset`","operationId":"scheduledEventGetAll","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledEventDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Scheduled Events"],"summary":"Create a scheduled event","description":"Creates a new scheduled event for a package deployment. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"scheduledEventCreate","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledEventCreateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledEventDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/packages":{"get":{"tags":["Packages"],"summary":"List all packages","description":"Returns a paginated list of packages. **Permissions:** `functions.package:read` on `account`","operationId":"packageGetAll","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"search","in":"query","description":"Case-insensitive substring search across package `name` and `description` fields.","required":false,"schema":{"type":"string"}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Packages"],"summary":"Create a package","description":"Creates a new package with an initial revision and functions. **Permissions:** `functions.package:write` on `account`","operationId":"packageCreate","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageCreateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-revisions":{"post":{"tags":["Revisions"],"summary":"Create a package revision","description":"Creates a new revision for an existing package with function definitions. **Permissions:** `functions.package:write` on `account`","operationId":"packageRevisionCreate","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageRevisionCreateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageRevisionDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-deployments":{"post":{"tags":["Deployments"],"summary":"Create a package deployment","description":"Assigns a package revision to a keyset, creating a deployment. **Permissions:** `functions.package-deployment:write` on `keyset`. The package revision must belong to the acting account.","operationId":"packageRevisionAssignToKeyset","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentCreateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-blueprints/{packageBlueprintId}/packages":{"post":{"tags":["Catalog"],"summary":"Import package from blueprint","description":"Creates a new package from a blueprint template. **Permissions:** `functions.package:write` on `account`, `functions.package-deployment:write` on `keyset`","operationId":"packageCreateFromBlueprint","parameters":[{"name":"packageBlueprintId","in":"path","description":"UUID of the package blueprint.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageImportFromBlueprintRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/counters/{key}/increment":{"post":{"tags":["KV Store"],"summary":"Increment a counter","description":"Increments a counter by the specified value (default 1). **Permissions:** `keyset:write` on `keyset`","operationId":"counterIncrement","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterMutateRequest"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/counters/{key}/decrement":{"post":{"tags":["KV Store"],"summary":"Decrement a counter","description":"Decrements a counter by the specified value (default 1). **Permissions:** `keyset:write` on `keyset`","operationId":"counterDecrement","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterMutateRequest"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/function-revisions/{functionRevisionId}/test-inputs":{"get":{"tags":["Revisions"],"summary":"List test inputs","description":"Returns a paginated list of test inputs for a function revision. The function revision must belong to the acting account. **Permissions:** `functions.package:read` on `account`","operationId":"functionRevisionGetTestInputs","parameters":[{"name":"functionRevisionId","in":"path","description":"UUID of the function revision.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionTestInputDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Revisions"],"summary":"Create a test input","description":"Creates a new test input for a function revision. The function revision must belong to the acting account. **Permissions:** `functions.package:write` on `account`","operationId":"functionRevisionAddTestInput","parameters":[{"name":"functionRevisionId","in":"path","description":"UUID of the function revision.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionRevisionTestInputCreateUpdateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionTestInputDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/packages/{packageId}/package-revisions":{"get":{"tags":["Packages"],"summary":"List revisions for a package","description":"Returns a paginated list of revisions for a given package. **Permissions:** `functions.package:read` on `account`","operationId":"packageGetRevisions","parameters":[{"name":"packageId","in":"path","description":"UUID of the package.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyset_id","in":"query","description":"Numeric ID of the keyset.","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"search","in":"query","description":"Case-insensitive substring search across revision `name` and `description` fields.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageRevisionDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-revisions/{packageRevisionId}/package-deployments":{"get":{"tags":["Revisions"],"summary":"List deployments for a revision","description":"Returns a paginated list of package deployments for a given revision. **Permissions:** `functions.package-deployment:read` on `keyset`","operationId":"packageRevisionGetDeployments","parameters":[{"name":"packageRevisionId","in":"path","description":"UUID of the package revision.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyset_id","in":"query","description":"Numeric ID of the keyset.","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"state","in":"query","description":"Deployment state to filter by.","required":false,"schema":{"type":"string","enum":["STARTING","RESTARTING","RUNNING","STOPPING","STOPPED","FAILED"]}},{"name":"search","in":"query","description":"Case-insensitive substring search across keyset `name`, `subkey`, and `pubkey` fields.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-revisions/{packageRevisionId}/functions":{"get":{"tags":["Revisions"],"summary":"List functions in a revision","description":"Returns a paginated list of function revisions belonging to a package revision. **Permissions:** `functions.package:read` on `account`","operationId":"packageRevisionGetFunctions","parameters":[{"name":"packageRevisionId","in":"path","description":"UUID of the package revision.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-deployments/{packageDeploymentId}":{"get":{"tags":["Deployments"],"summary":"Get a package deployment","description":"Returns a single package deployment by ID. **Permissions:** `functions.package-deployment:read` on `keyset`","operationId":"packageDeploymentGet","parameters":[{"name":"packageDeploymentId","in":"path","description":"UUID of the package deployment.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Deployments"],"summary":"Delete a package deployment","description":"Removes a package deployment from a keyset. **Permissions:** `functions.package-deployment:write` on `keyset`","operationId":"packageDeploymentDelete","parameters":[{"name":"packageDeploymentId","in":"path","description":"UUID of the package deployment.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — resource state conflict, uniqueness violation, or limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-deployments/intersected":{"get":{"tags":["Deployments"],"summary":"Get intersected deployments","description":"Returns package deployments that intersect with the given channels on a keyset. **Permissions:** `functions.package-deployment:read` on `keyset`","operationId":"getIntersectedPackageDeployments","parameters":[{"name":"keyset_id","in":"query","description":"Numeric ID of the keyset.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"channel","in":"query","description":"Channel name or pattern to filter by.","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"function_type","in":"query","description":"Function type to filter deployments by.","required":false,"schema":{"type":"string","enum":["BEFORE_PUBLISH","BEFORE_PUBLISH_FILE","BEFORE_SIGNAL","AFTER_PUBLISH","AFTER_PUBLISH_FILE","AFTER_PRESENCE","AFTER_SIGNAL","ON_INTERVAL","ON_INTERVAL_WITH_SUBSCRIPTION","ON_REST"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntersectedPackageDeploymentsDTOListResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-blueprints":{"get":{"tags":["Catalog"],"summary":"List package blueprints","description":"Returns a paginated list of generally available package blueprints, with optional tag and name filters.","operationId":"packageBlueprintGetAll","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":50,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"tag_ids","in":"query","description":"Filter by tag ids (comma-separated values).","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"tag_names","in":"query","description":"Filter by tag names (comma-separated values).","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"name","in":"query","description":"Filter by name (partial match).","required":false,"schema":{"type":"string"}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageBlueprintDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-blueprints/{packageBlueprintId}":{"get":{"tags":["Catalog"],"summary":"Get a package blueprint","description":"Returns a single generally available package blueprint by ID.","operationId":"packageBlueprintGet","parameters":[{"name":"packageBlueprintId","in":"path","description":"UUID of the package blueprint.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageBlueprintDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/package-blueprints/{packageBlueprintId}/function-blueprints":{"get":{"tags":["Catalog"],"summary":"List function blueprints","description":"Returns function blueprints belonging to a package blueprint.","operationId":"packageBlueprintGetFunctionBlueprints","parameters":[{"name":"packageBlueprintId","in":"path","description":"UUID of the package blueprint.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"detailed","in":"query","description":"When true, includes function blueprint parameters and test inputs in the response.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionBlueprintDTOListResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/limits/package-deployments-running":{"get":{"tags":["Limits"],"summary":"Get running deployments limit","description":"Returns the current and maximum number of running package deployments for the acting account. **Permissions:** `functions.package:read` on `account`","operationId":"getLimitPackageDeploymentsRunning","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/strings":{"get":{"tags":["KV Store"],"summary":"List all string entries","description":"Returns a paginated list of all string key-value entries for the given keyset. **Permissions:** `keyset:read` on `keyset`","operationId":"stringsGetAll","parameters":[{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","maximum":300}},{"name":"page_token","in":"query","description":"Cursor token for the next page of results.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringKeyValueDTOCursorPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/secrets":{"get":{"tags":["Secrets Storage"],"summary":"List all secret keys","description":"Returns a list of all secret key names for the given keyset. Values are not returned. **Permissions:** `keyset:read` on `keyset`","operationId":"secretsGetAll","parameters":[{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","maximum":300}},{"name":"page_token","in":"query","description":"Cursor token for the next page of results.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretDTOCursorPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/jsons":{"get":{"tags":["KV Store"],"summary":"List all JSON entries","description":"Returns a paginated list of all JSON key-value entries for the given keyset. **Permissions:** `keyset:read` on `keyset`","operationId":"jsonsGetAll","parameters":[{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","maximum":300}},{"name":"page_token","in":"query","description":"Cursor token for the next page of results.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonKeyValueDTOCursorPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/counters":{"get":{"tags":["KV Store"],"summary":"List all counter entries","description":"Returns a paginated list of all counter key-value entries for the given keyset. **Permissions:** `keyset:read` on `keyset`","operationId":"countersGetAll","parameters":[{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","maximum":300}},{"name":"page_token","in":"query","description":"Cursor token for the next page of results.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterKeyValueDTOCursorPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/kv/counters/{key}":{"get":{"tags":["KV Store"],"summary":"Get a counter entry by key","description":"Returns a single counter key-value entry. **Permissions:** `keyset:read` on `keyset`","operationId":"counterGet","parameters":[{"name":"key","in":"path","description":"Key name for the KV store entry.","required":true,"schema":{"type":"string"}},{"name":"subkey","in":"query","description":"PubNub subscribe key identifying the keyset.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringKeyValueDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/function-blueprints/{functionBlueprintId}/function-blueprint-params":{"get":{"tags":["Catalog"],"summary":"List blueprint parameters","description":"Returns parameters for a given function blueprint.","operationId":"functionBlueprintGetParams","parameters":[{"name":"functionBlueprintId","in":"path","description":"UUID of the function blueprint.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionBlueprintParamDTOListResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/function-blueprint-params":{"get":{"tags":["Catalog"],"summary":"List all blueprint parameters","description":"Returns a paginated list of function blueprint parameters with optional filtering by name or package blueprint.","operationId":"functionBlueprintParamGetAll","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"maximum":300,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":3}},{"name":"name","in":"query","description":"Filter by name (partial match).","required":false,"schema":{"type":"string"}},{"name":"package_blueprint_id","in":"query","description":"Filter by package blueprint id (exact match).","required":false,"schema":{"type":"string"}},{"name":"Page-Number","in":"header","description":"Zero-based page number (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":0}},{"name":"Page-Size","in":"header","description":"Number of items per page (overrides query parameter).","required":false,"schema":{"type":"integer","format":"int32","example":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionBlueprintParamDTOPagedResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/function-blueprint-params/{functionBlueprintParamId}":{"get":{"tags":["Catalog"],"summary":"Get a blueprint parameter","description":"Returns a single function blueprint parameter by ID.","operationId":"functionBlueprintParamGet","parameters":[{"name":"functionBlueprintParamId","in":"path","description":"UUID of the function blueprint parameter.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionBlueprintParamDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/configs/state":{"get":{"tags":["Configs"],"summary":"Get account state","description":"Returns the current lifecycle state of the calling account.","operationId":"getAccountState","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountStateDTOResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/faas/function-deployments":{"delete":{"tags":["Deployments"],"summary":"Stop deployments by package or revision","description":"Stops all deployments for a given package (by `package_id`) or all deployments for a given revision (by `package_revision_id`). Exactly one parameter must be provided. The package or package revision must belong to the acting account. **Permissions:** `functions.package-deployment:write` on `account`","operationId":"functionDeploymentsStop","parameters":[{"name":"package_id","in":"query","description":"UUID of the package.","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"package_revision_id","in":"query","description":"UUID of the package revision.","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"force","in":"query","description":"When true, forces the operation even if preconditions are not met.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDeploymentDTOListResponse"}}}},"400":{"description":"Bad Request — validation error, malformed JSON, or invalid parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — insufficient permissions for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity — business validation failed (e.g. code transpilation error, resource limit exceeded).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"423":{"description":"Locked — resource is in a transitional state, retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error — unexpected failure, contact support if persistent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/insights":{"get":{"operationId":"getData","parameters":[{"name":"entityType","required":true,"in":"query","description":"Type of entity to query. Valid values: account, app, keyset.","schema":{"type":"string","enum":["account","app","keyset"]}},{"name":"entityId","required":true,"in":"query","description":"Unique identifier for the entity. Depends on entityType: `account` & `app` — ID (e.g. 35398856), `keyset` — subscribe key (e.g. sub-c-xxxxxxxx).","schema":{"type":"string"}},{"name":"period","required":true,"in":"query","description":"Time period granularity. Valid values: hourly, daily, weekly, monthly.","schema":{"type":"string","enum":["hourly","daily","weekly","monthly"]}},{"name":"fromDate","required":true,"in":"query","description":"Start date (ISO 8601 format).","schema":{"type":"string"}},{"name":"toDate","required":true,"in":"query","description":"End date (ISO 8601 format). Must be >= fromDate.","schema":{"type":"string"}},{"name":"filters","required":false,"in":"query","description":"Available operators eq, neq, gt, lt, gte, lte, in, nin, startsWith, endsWith, contains","schema":{"example":"{ \"top_1000_channels\": [{ \"field\": \"channel_name\", \"operator\": \"in\", \"value\": [\"channel_1\", \"channel_2\"] }, { \"field\": \"count_subscribers\", \"operator\": \"eq\", \"value\": \"2\" } ], \"top_1000_users\": [{ \"field\" : \"count_messages\" , \"operator\": \"gt\", \"value\": \"2000\" }] }","type":"string"}},{"name":"metric","required":true,"in":"query","description":"Array of metric names to retrieve.","schema":{"type":"array","items":{"type":"string","enum":["message_by_country","messages_by_country","messages_by_state_and_country","messages_by_location","unique_users_by_country","unique_users_by_location","unique_channels","percent_unique_channels_with_messages","unique_channels_combination","unique_users","percent_unique_users_with_messages","unique_users_combination","new_vs_recurring_users","avg_user_duration","unique_users_by_duration_timeframe","publishes_by_device_type","subscribers_by_device_type","unique_users_by_device_type","messages","top_10_message_types","channel_patterns"]}}},{"name":"orderBy","required":false,"in":"query","description":"Sort order specification.","schema":{"example":"{ \"channel_patterns\": [{ \"field\": \"channel_name\", direction: \"DESC\" }, { \"field\": \"count_subscribers\", direction: \"ASC\" }] }","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum results to return.","schema":{"type":"number"}}],"responses":{"200":{"description":"Even if the status code is 200 (success), sometimes you might not see anything returned in dataResult. This can happen when the data you requested is not available at the moment. In such cases, try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseApiResponse"}}}},"400":{"description":"This could be due to one of the following reasons but not limited to this list: Invalid period - Each metric is associated with particular periods. If you request a metric for a period for which it is not available, you will see this error. In such cases, use a different period to request the metric.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestExceptionResponse"}}}},"401":{"description":"This is an error that occurs when the user is not authenticated i.e. user didn’t provide the Token in the header for the API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"This is a Forbidden resource error. <br> 1) This might occur if your account only has the Insights Standard version activated, but does not have Insights Premium. The Insights API is only available to Insights Premium. <br> 2) This might also occur when you are requesting data for an account / app / keyset that you don’t have access to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResourceErrorResponse"}}}},"500":{"description":"This is a server error (Bad Request). This would usually mean something has gone wrong on PubNub’s end, for example, when the database is down. If you see this error and cannot find the reason alone, contact [PubNub support](mailto:support@pubnub.com)"}},"tags":["Insights"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/insights/top":{"get":{"operationId":"getTopNData","parameters":[{"name":"entityType","required":true,"in":"query","description":"Type of entity to query. Valid values: account, app, keyset.","schema":{"type":"string","enum":["account","app","keyset"]}},{"name":"entityId","required":true,"in":"query","description":"Unique identifier for the entity. Depends on entityType: `account` & `app` — ID (e.g. 35398856), `keyset` — subscribe key (e.g. sub-c-xxxxxxxx).","schema":{"type":"string"}},{"name":"period","required":true,"in":"query","description":"Time period granularity. Valid values: hourly, daily, weekly, monthly.","schema":{"type":"string","enum":["hourly","daily","weekly","monthly"]}},{"name":"fromDate","required":true,"in":"query","description":"Start date (ISO 8601 format).","schema":{"type":"string"}},{"name":"toDate","required":true,"in":"query","description":"End date (ISO 8601 format). Must be >= fromDate.","schema":{"type":"string"}},{"name":"filters","required":false,"in":"query","description":"Available operators eq, neq, gt, lt, gte, lte, in, nin, startsWith, endsWith, contains","schema":{"example":"{ \"top_1000_channels\": [{ \"field\": \"channel_name\", \"operator\": \"in\", \"value\": [\"channel_1\", \"channel_2\"] }, { \"field\": \"count_subscribers\", \"operator\": \"eq\", \"value\": \"2\" } ], \"top_1000_users\": [{ \"field\" : \"count_messages\" , \"operator\": \"gt\", \"value\": \"2000\" }] }","type":"string"}},{"name":"metric","required":true,"in":"query","description":"Array of metric names to retrieve.","schema":{"type":"array","items":{"type":"string","enum":["top_20_channels","top_1000_channels","top_20_users","top_1000_users","top_20_channels_with_user_duration","top_1000_channels_with_user_duration"]}}},{"name":"category","required":true,"in":"query","description":"Category for top N queries: channels, users, device_types.","schema":{"type":"string","enum":["all","by_chats","by_messages","by_subscribers","by_users_with_chats","by_users_with_messages","by_subscribed_channels"]}}],"responses":{"200":{"description":"Even if the status code is 200 (success), sometimes you might not see anything returned in dataResult. This can happen when the data you requested is not available at the moment. In such cases, try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseApiResponse"}}}},"400":{"description":"This could be due to one of the following reasons but not limited to this list: Invalid period - Each metric is associated with particular periods. If you request a metric for a period for which it is not available, you will see this error. In such cases, use a different period to request the metric.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestExceptionResponse"}}}},"401":{"description":"This is an error that occurs when the user is not authenticated i.e. user didn’t provide the Token in the header for the API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"This is a Forbidden resource error. <br> 1) This might occur if your account only has the Insights Standard version activated, but does not have Insights Premium. The Insights API is only available to Insights Premium. <br> 2) This might also occur when you are requesting data for an account / app / keyset that you don’t have access to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResourceErrorResponse"}}}},"500":{"description":"This is a server error (Bad Request). This would usually mean something has gone wrong on PubNub’s end, for example, when the database is down. If you see this error and cannot find the reason alone, contact [PubNub support](mailto:support@pubnub.com)"}},"tags":["Insights"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/datasync/subkeys/{subKey}/entity-classes":{"get":{"tags":["Entity Class"],"summary":"Get all entity class entries","operationId":"listEntityClasses","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}],"responses":{"200":{"description":"Successful response","content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassesEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/datasync/subkeys/{subKey}/entity-classes/{entityClass}/versions/{entityClassVersion}":{"get":{"tags":["Entity Class"],"summary":"Get entity class by ID","operationId":"getEntityClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"entityClass","in":"path","description":"Name of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"entityClassVersion","in":"path","description":"Version of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},{"name":"entity_class_level","in":"query","description":"Level of the entity class.","required":false,"schema":{"$ref":"#/components/schemas/ClassLevel","exampleSetFlag":false}}],"responses":{"200":{"description":"Successful response","content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"404":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"put":{"tags":["Entity Class"],"summary":"Update entity class with complete resource replacement","operationId":"updateEntityClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"entityClass","in":"path","description":"Name of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"entityClassVersion","in":"path","description":"Version of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},{"name":"If-Match","in":"header","description":"ETag value for optimistic concurrency control. If provided, the update will only succeed if the current resource ETag matches this value.","required":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}],"requestBody":{"content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/UpdateEntityClassRequest","exampleSetFlag":false},"exampleSetFlag":false}},"required":true,"extensions":{"x-codegen-request-body-name":"updateRequest"}},"responses":{"200":{"description":"Successful response","content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request. For entity class create and replace, which validate projections and, when the\nclass extends a parent, inherited property compatibility.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0003` | INVALID_JSON | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | Body, path variable or query parameter failed validation. |\n| `DS-0006` | INVALID_ARGUMENT | Neither `config` nor `extends` supplied, or `extends` targets a class at the same or a lower class level. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | A projection name is too long, malformed, or a property declares an empty projection list. |\n| `DS-0903` | INCOMPATIBLE_CHILD_PROPERTY | A redeclared inherited property differs from the parent in `path`, `valueKind`, or `nullable`. `path` is the property name. Entity classes only. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | A property shadows a built-in record field. `status` may be declared only at `/status` to control projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | The class name is reserved (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"IncompatibleChildProperty":{"$ref":"#/components/examples/IncompatibleChildProperty","valueSetFlag":false},"ProjectionLimitExceeded":{"$ref":"#/components/examples/ProjectionLimitExceeded","valueSetFlag":false},"InvalidProjectionName":{"$ref":"#/components/examples/InvalidProjectionName","valueSetFlag":false},"ReservedPropertyName":{"$ref":"#/components/examples/ReservedPropertyName","valueSetFlag":false},"ReservedClassName":{"$ref":"#/components/examples/ReservedClassName","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false},"InvalidJson":{"$ref":"#/components/examples/InvalidJson","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden. Adds the global class guard, which applies to class replace and delete.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, or the authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, or its projection does not permit the requested fields. |\n| `DS-0900` | GLOBAL_CLASS_MODIFICATION | The target class is a global class definition, which is read-only. Applies to replace and delete only. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"GlobalClassModification":{"$ref":"#/components/examples/GlobalClassModification","valueSetFlag":false},"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false}},"exampleSetFlag":false}}},"404":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"412":{"description":"Precondition Failed.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0300` | ETAG_MISMATCH | The `If-Match` header does not contain the resource's current ETag. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ETagMismatch":{"$ref":"#/components/examples/ETagMismatch","valueSetFlag":false}},"exampleSetFlag":false}}},"415":{"description":"Unsupported Media Type.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0007` | UNSUPPORTED_CONTENT_TYPE | The request `Content-Type` is not supported by this operation. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"UnsupportedContentType":{"$ref":"#/components/examples/UnsupportedContentType","valueSetFlag":false}},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"post":{"tags":["Entity Class"],"summary":"Create a new entity class","description":"Creates a new entity class with its registry configuration, property definitions.\n","operationId":"createEntityClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"entityClass","in":"path","description":"Name of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"entityClassVersion","in":"path","description":"Version of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}}],"requestBody":{"content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/CreateEntityClassRequest","exampleSetFlag":false},"exampleSetFlag":false}},"required":true},"responses":{"201":{"description":"Entity class created successfully","headers":{"Location":{"description":"URI of the created entity class","style":"SIMPLE","explode":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}},"content":{"application/vnd.pubnub.objects.entity-class+json;version=1":{"schema":{"$ref":"#/components/schemas/EntityClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request. For entity class create and replace, which validate projections and, when the\nclass extends a parent, inherited property compatibility.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0003` | INVALID_JSON | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | Body, path variable or query parameter failed validation. |\n| `DS-0006` | INVALID_ARGUMENT | Neither `config` nor `extends` supplied, or `extends` targets a class at the same or a lower class level. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | A projection name is too long, malformed, or a property declares an empty projection list. |\n| `DS-0903` | INCOMPATIBLE_CHILD_PROPERTY | A redeclared inherited property differs from the parent in `path`, `valueKind`, or `nullable`. `path` is the property name. Entity classes only. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | A property shadows a built-in record field. `status` may be declared only at `/status` to control projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | The class name is reserved (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"IncompatibleChildProperty":{"$ref":"#/components/examples/IncompatibleChildProperty","valueSetFlag":false},"ProjectionLimitExceeded":{"$ref":"#/components/examples/ProjectionLimitExceeded","valueSetFlag":false},"InvalidProjectionName":{"$ref":"#/components/examples/InvalidProjectionName","valueSetFlag":false},"ReservedPropertyName":{"$ref":"#/components/examples/ReservedPropertyName","valueSetFlag":false},"ReservedClassName":{"$ref":"#/components/examples/ReservedClassName","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false},"InvalidJson":{"$ref":"#/components/examples/InvalidJson","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"409":{"description":"Conflict.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0301` | CONFLICT | A resource with the same identity already exists. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Conflict":{"$ref":"#/components/examples/Conflict","valueSetFlag":false}},"exampleSetFlag":false}}},"415":{"description":"Unsupported Media Type.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0007` | UNSUPPORTED_CONTENT_TYPE | The request `Content-Type` is not supported by this operation. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"UnsupportedContentType":{"$ref":"#/components/examples/UnsupportedContentType","valueSetFlag":false}},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"delete":{"tags":["Entity Class"],"summary":"Delete entity class by ID","operationId":"deleteEntityClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"entityClass","in":"path","description":"Name of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"entityClassVersion","in":"path","description":"Version of an entity class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},{"name":"If-Match","in":"header","description":"ETag value for optimistic concurrency control. If provided, the update will only succeed if the current resource ETag matches this value.","required":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}],"responses":{"200":{"description":"Resource deleted successfully"},"400":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden. Adds the global class guard, which applies to class replace and delete.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, or the authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, or its projection does not permit the requested fields. |\n| `DS-0900` | GLOBAL_CLASS_MODIFICATION | The target class is a global class definition, which is read-only. Applies to replace and delete only. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"GlobalClassModification":{"$ref":"#/components/examples/GlobalClassModification","valueSetFlag":false},"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false}},"exampleSetFlag":false}}},"404":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"412":{"description":"Precondition Failed.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0300` | ETAG_MISMATCH | The `If-Match` header does not contain the resource's current ETag. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ETagMismatch":{"$ref":"#/components/examples/ETagMismatch","valueSetFlag":false}},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/datasync/subkeys/{subKey}/relationship-classes":{"get":{"tags":["Relationship Class"],"summary":"Get all relationship classes","operationId":"listRelationshipClasses","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}],"responses":{"200":{"description":"Successful response","content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassesEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/datasync/subkeys/{subKey}/relationship-classes/{relationshipClass}/versions/{relationshipClassVersion}":{"get":{"tags":["Relationship Class"],"summary":"Get relationship class by name and version","operationId":"getRelationshipClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"relationshipClass","in":"path","description":"Name of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"relationshipClassVersion","in":"path","description":"Version of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}}],"responses":{"200":{"description":"Successful response","content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"404":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"put":{"tags":["Relationship Class"],"summary":"Update relationship class with complete resource replacement","operationId":"updateRelationshipClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"relationshipClass","in":"path","description":"Name of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"relationshipClassVersion","in":"path","description":"Version of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},{"name":"If-Match","in":"header","description":"ETag value for optimistic concurrency control. If provided, the update will only succeed if the current resource ETag matches this value.","required":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}],"requestBody":{"content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/UpdateRelationshipClassRequest","exampleSetFlag":false},"exampleSetFlag":false}},"required":true,"extensions":{"x-codegen-request-body-name":"updateRequest"}},"responses":{"200":{"description":"Successful response","content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request. For relationship class create and replace. Relationship classes cannot be\nsubclassed, so no inheritance error applies.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0003` | INVALID_JSON | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | Body, path variable or query parameter failed validation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter or body value could not be used. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | A projection name is too long, malformed, or a property declares an empty projection list. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | A property shadows a built-in record field. `status` may be declared only at `/status` to control projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | The class name is reserved (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ProjectionLimitExceeded":{"$ref":"#/components/examples/ProjectionLimitExceeded","valueSetFlag":false},"InvalidProjectionName":{"$ref":"#/components/examples/InvalidProjectionName","valueSetFlag":false},"ReservedPropertyName":{"$ref":"#/components/examples/ReservedPropertyName","valueSetFlag":false},"ReservedClassName":{"$ref":"#/components/examples/ReservedClassName","valueSetFlag":false},"InvalidJson":{"$ref":"#/components/examples/InvalidJson","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden. Adds the global class guard, which applies to class replace and delete.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, or the authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, or its projection does not permit the requested fields. |\n| `DS-0900` | GLOBAL_CLASS_MODIFICATION | The target class is a global class definition, which is read-only. Applies to replace and delete only. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"GlobalClassModification":{"$ref":"#/components/examples/GlobalClassModification","valueSetFlag":false},"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false}},"exampleSetFlag":false}}},"404":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"412":{"description":"Precondition Failed.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0300` | ETAG_MISMATCH | The `If-Match` header does not contain the resource's current ETag. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ETagMismatch":{"$ref":"#/components/examples/ETagMismatch","valueSetFlag":false}},"exampleSetFlag":false}}},"415":{"description":"Unsupported Media Type.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0007` | UNSUPPORTED_CONTENT_TYPE | The request `Content-Type` is not supported by this operation. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"UnsupportedContentType":{"$ref":"#/components/examples/UnsupportedContentType","valueSetFlag":false}},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"post":{"tags":["Relationship Class"],"summary":"Create a new relationship class","description":"Creates a new relationship class that defines a type of relationship between entities.\n","operationId":"createRelationshipClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"relationshipClass","in":"path","description":"Name of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"relationshipClassVersion","in":"path","description":"Version of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}}],"requestBody":{"content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/CreateRelationshipClassRequest","exampleSetFlag":false},"exampleSetFlag":false}},"required":true},"responses":{"201":{"description":"Relationship class created successfully","headers":{"Location":{"description":"URI of the created relationship class","style":"SIMPLE","explode":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}},"content":{"application/vnd.pubnub.objects.relationship-class+json;version=1":{"schema":{"$ref":"#/components/schemas/RelationshipClassEnvelope","exampleSetFlag":false},"exampleSetFlag":false}}},"400":{"description":"Bad request. For relationship class create and replace. Relationship classes cannot be\nsubclassed, so no inheritance error applies.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0003` | INVALID_JSON | Request body absent, empty, or not valid JSON. |\n| `DS-0004` | VALIDATION_ERROR | Body, path variable or query parameter failed validation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter or body value could not be used. |\n| `DS-0901` | PROJECTION_LIMIT_EXCEEDED | Distinct projections across all properties exceed the per-class maximum. |\n| `DS-0902` | INVALID_PROJECTION_NAME | A projection name is too long, malformed, or a property declares an empty projection list. |\n| `DS-0906` | RESERVED_PROPERTY_NAME | A property shadows a built-in record field. `status` may be declared only at `/status` to control projections. |\n| `DS-0907` | RESERVED_CLASS_NAME | The class name is reserved (`User`, `Channel`, `Membership`, `Entity`, `Relationship`), case-insensitively. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ProjectionLimitExceeded":{"$ref":"#/components/examples/ProjectionLimitExceeded","valueSetFlag":false},"InvalidProjectionName":{"$ref":"#/components/examples/InvalidProjectionName","valueSetFlag":false},"ReservedPropertyName":{"$ref":"#/components/examples/ReservedPropertyName","valueSetFlag":false},"ReservedClassName":{"$ref":"#/components/examples/ReservedClassName","valueSetFlag":false},"InvalidJson":{"$ref":"#/components/examples/InvalidJson","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden - credentials were recognised but the request is not permitted.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, `auth` and `signature` were both supplied, or the portal authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, its projection does not permit the requested fields, or one of its grant patterns is too complex to evaluate. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false},"InvalidTokenGrantPattern":{"$ref":"#/components/examples/InvalidTokenGrantPattern","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"409":{"description":"Conflict.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0301` | CONFLICT | A resource with the same identity already exists. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Conflict":{"$ref":"#/components/examples/Conflict","valueSetFlag":false}},"exampleSetFlag":false}}},"415":{"description":"Unsupported Media Type.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0007` | UNSUPPORTED_CONTENT_TYPE | The request `Content-Type` is not supported by this operation. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"UnsupportedContentType":{"$ref":"#/components/examples/UnsupportedContentType","valueSetFlag":false}},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"delete":{"tags":["Relationship Class"],"summary":"Delete relationship class by name and version","operationId":"deleteRelationshipClass","parameters":[{"name":"subKey","in":"path","description":"Subscribe key identifying the keyset.","required":true,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}},{"name":"relationshipClass","in":"path","description":"Name of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"$ref":"#/components/schemas/ClassName","exampleSetFlag":false}},{"name":"relationshipClassVersion","in":"path","description":"Version of a relationship class","required":true,"style":"SIMPLE","explode":false,"schema":{"minimum":1,"type":"integer","exampleSetFlag":false,"types":["integer"]}},{"name":"If-Match","in":"header","description":"ETag value for optimistic concurrency control. If provided, the update will only succeed if the current resource ETag matches this value.","required":false,"schema":{"type":"string","exampleSetFlag":false,"types":["string"]}}],"responses":{"200":{"description":"Resource deleted successfully"},"400":{"description":"Bad request.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0002` | BAD_REQUEST | Required header or query parameter missing. |\n| `DS-0004` | VALIDATION_ERROR | Path variable or query parameter failed validation. One error item per violation. |\n| `DS-0006` | INVALID_ARGUMENT | A parameter value could not be used (wrong type, unusable value). |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"BadRequest":{"$ref":"#/components/examples/BadRequest","valueSetFlag":false},"ValidationError":{"$ref":"#/components/examples/ValidationError","valueSetFlag":false},"InvalidArgument":{"$ref":"#/components/examples/InvalidArgument","valueSetFlag":false}},"exampleSetFlag":false}}},"401":{"description":"Unauthorized - no usable credentials were supplied.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0203` | UNAUTHENTICATED | Neither a PAM token (`auth`) nor a request `signature` was supplied, or the portal session token is missing. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"Unauthenticated":{"$ref":"#/components/examples/Unauthenticated","valueSetFlag":false}},"exampleSetFlag":false}}},"403":{"description":"Forbidden. Adds the global class guard, which applies to class replace and delete.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0200` | DATASYNC_NOT_ENABLED | Datasync is not enabled for this subscribe key. |\n| `DS-0201` | ACCESS_DENIED | Access Manager is not enabled for the keyset, or the authorization check denied the request. |\n| `DS-0202` | INVALID_TOKEN | The `auth` PAM token could not be decoded, or its projection does not permit the requested fields. |\n| `DS-0900` | GLOBAL_CLASS_MODIFICATION | The target class is a global class definition, which is read-only. Applies to replace and delete only. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"GlobalClassModification":{"$ref":"#/components/examples/GlobalClassModification","valueSetFlag":false},"DatasyncNotEnabled":{"$ref":"#/components/examples/DatasyncNotEnabled","valueSetFlag":false},"AccessDenied":{"$ref":"#/components/examples/AccessDenied","valueSetFlag":false},"InvalidToken":{"$ref":"#/components/examples/InvalidToken","valueSetFlag":false}},"exampleSetFlag":false}}},"404":{"description":"Not found.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0100` | NOT_FOUND | The addressed resource does not exist. Also returned when a conditional request supplies no `If-Match` and the resource is absent. |\n| `DS-0600` | CONFIG_NOT_FOUND | The subscribe key is unknown to the configuration service, or its datasync region is not configured. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"NotFound":{"$ref":"#/components/examples/NotFound","valueSetFlag":false},"ConfigNotFound":{"$ref":"#/components/examples/ConfigNotFound","valueSetFlag":false}},"exampleSetFlag":false}}},"406":{"description":"Not Acceptable - the `Accept` header does not contain a supported value.\n\nThis response carries a `text/plain` body and **no** error code.","content":{"text/plain":{"schema":{"type":"string","example":"Accept header value is not acceptable. Supported values are [application/json]","exampleSetFlag":true,"types":["string"]},"exampleSetFlag":false}}},"412":{"description":"Precondition Failed.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0300` | ETAG_MISMATCH | The `If-Match` header does not contain the resource's current ETag. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ETagMismatch":{"$ref":"#/components/examples/ETagMismatch","valueSetFlag":false}},"exampleSetFlag":false}}},"429":{"description":"Too Many Requests - rate limit exceeded.\n\nRate limiting is applied by the edge in front of this service; the service itself defines no\nerror code for this status. Clients should not rely on an error code being present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"exampleSetFlag":false}}},"500":{"description":"Internal server error.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0000` | INTERNAL_SERVER_ERROR | An unhandled error occurred, or the request could not be routed because of a server-side configuration problem. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"InternalServerError":{"$ref":"#/components/examples/InternalServerError","valueSetFlag":false}},"exampleSetFlag":false}}},"503":{"description":"Service Unavailable.\n\n| Code | Constant | Cause |\n|---|---|---|\n| `DS-0009` | SERVICE_UNAVAILABLE | A dependency required to serve the request is unavailable, or the request could not be forwarded to its target region. A `Retry-After` header may be present. |","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse","exampleSetFlag":false},"examples":{"ServiceUnavailable":{"$ref":"#/components/examples/ServiceUnavailable","valueSetFlag":false}},"exampleSetFlag":false}}}}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/apps/{id}":{"get":{"tags":["Apps"],"operationId":"Apps.getAppById","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Unique identifier for the app"},"name":{"type":"string","description":"Human-readable name for the app"},"createdAt":{"type":"string","description":"ISO 8601 timestamp of creation"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of last update"}},"additionalProperties":false,"examples":[{"id":"app_123456","name":"My App","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves an app by its id.","summary":"Get app by ID"},"delete":{"tags":["Apps"],"operationId":"Apps.deleteApp","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}},"additionalProperties":false,"examples":[{"success":true}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves an app by its unique identifier.","summary":"Delete an app"},"patch":{"tags":["Apps"],"operationId":"Apps.updateApp","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Unique identifier for the app"},"name":{"type":"string","description":"Human-readable name for the app"},"createdAt":{"type":"string","description":"ISO 8601 timestamp of creation"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of last update"}},"additionalProperties":false,"examples":[{"id":"app_123456","name":"Updated App Name","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Updates an app's name. Only the name field can be modified.","summary":"Update an app","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"A human-readable name for the app"}},"additionalProperties":false,"examples":[{"name":"Updated App Name"}]}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/apps":{"post":{"tags":["Apps"],"operationId":"Apps.createApp","parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Unique identifier for the app"},"name":{"type":"string","description":"Human-readable name for the app"},"createdAt":{"type":"string","description":"ISO 8601 timestamp of creation"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of last update"}},"additionalProperties":false,"examples":[{"id":"app_123456","name":"My New App","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Creates a new app in your PubNub account. Apps are containers for keysets.","summary":"Create a new app","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"A human-readable name for the app"}},"additionalProperties":false,"examples":[{"name":"My New App"}]}}},"required":true}},"get":{"tags":["Apps"],"operationId":"Apps.getApps","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1,"description":"Parameter to specify which page to retrieve (default: 1)"},"required":false,"description":"Parameter to specify which page to retrieve (default: 1)"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"default":10,"description":"Parameter to specify number of items per page (default: 10)"},"required":false,"description":"Parameter to specify number of items per page (default: 10)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["apps","total","page","limit"],"properties":{"apps":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Unique identifier for the app"},"name":{"type":"string","description":"Human-readable name for the app"},"createdAt":{"type":"string","description":"ISO 8601 timestamp of creation"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of last update"}},"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"additionalProperties":false,"examples":[{"apps":[{"id":"123456","name":"Telemedicine","createdAt":"2022-10-23T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"},{"id":"87654","name":"Another App","createdAt":"2024-10-27T12:00:00Z","updatedAt":"2025-04-27T12:00:00Z"}],"total":2,"page":1,"limit":10}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves a paginated list of apps for the authenticated account.","summary":"Get all apps"},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/keysets":{"post":{"tags":["Keysets"],"operationId":"Keysets.createKeysetV2","parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["keyset"],"properties":{"keyset":{"type":"object","required":["appId","id","publishKey","subscribeKey","secretKeys"],"properties":{"name":{"type":"string","description":"A human-readable name for the keyset."},"type":{"type":"string","enum":["testing","production"],"description":"The type of the keyset, either \"testing\" or \"production\". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan."},"appId":{"type":"string","description":"The ID of the app this this keyset belongs to."},"id":{"type":"string"},"publishKey":{"type":"string"},"subscribeKey":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"secretKeys":{"type":"array","items":{"type":"object","required":["secretKey","expiresAt"],"properties":{"secretKey":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expiration timestamp in ISO 8601 UTC format (e.g., \"2025-12-31T23:59:59Z\"). null means the secret key will not expire."}},"additionalProperties":false},"description":"Array of secret keys for the keyset. Should contain exactly one non-expiring keyset."}},"additionalProperties":false},"config":{"type":"object","required":["accessManager","files","streamController","appContext","dataSync","apns","fcm","messagePersistence","presence"],"properties":{"accessManager":{"type":"object","required":["enabled","tokenRevoke"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable Access Manager"},"tokenRevoke":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token"}},"additionalProperties":false},"files":{"type":"object","required":["enabled","retention","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable file sharing"},"retention":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration."}},"additionalProperties":false},"streamController":{"type":"object","required":["enabled","wildcardSubscribe","channelGroupLimit"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable stream controller"},"wildcardSubscribe":{"type":"boolean","description":"Allows subscribing to wildcard channels (eg. foo.*)"},"channelGroupLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100"}},"additionalProperties":false},"appContext":{"type":"object","required":["enabled","userMetadataEvents","channelMetadataEvents","membershipEvents","disallowGetAllChannelMetadata","disallowGetAllUserMetadata","referentialIntegrity","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable app context"},"userMetadataEvents":{"type":"boolean","description":"Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database."},"channelMetadataEvents":{"type":"boolean","description":"Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes."},"membershipEvents":{"type":"boolean","description":"Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events."},"disallowGetAllChannelMetadata":{"type":"boolean","description":"If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema."},"disallowGetAllUserMetadata":{"type":"boolean","description":"If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema."},"referentialIntegrity":{"type":"boolean","description":"When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1."}},"additionalProperties":false},"dataSync":{"type":"object","required":["enabled","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable DataSync. Customer DataSync requests require Access Manager to be enabled separately; this setting does not enable Access Manager automatically."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The configured DataSync AWS region, or null if no region has been set. Disabling DataSync preserves the region; once set, it cannot be changed."}},"additionalProperties":false},"apns":{"type":"object","required":["enabled","teamId","authKeyId","filename"],"properties":{"enabled":{"type":"boolean"},"teamId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Team ID, 10 characters long"},{"type":"null"}]},"authKeyId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Auth Key ID, 10 characters long"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string","description":"Original filename of the token file. This only serves indentification purposes."},{"type":"null"}]}},"additionalProperties":false,"description":"Connection details for APNs when you use it as a push service provider to deliver push notifications to your application. https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns.  On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename."},"fcm":{"type":"object","required":["filename"],"properties":{"filename":{"anyOf":[{"type":"string","description":"Original filename of the FCM key file. This only serves identification purposes."},{"type":"null"}]}},"additionalProperties":false,"description":"Connection details for FCM when you use it as a push service provider to deliver push notifications to your application. https://firebase.google.com/docs/cloud-messaging. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename."},"messagePersistence":{"type":"object","required":["enabled","includePresenceEvents","deleteFromHistory","retention"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable message persistence"},"includePresenceEvents":{"type":"boolean","description":"Store presence event messages in message history."},"deleteFromHistory":{"type":"boolean","description":"A setting that lets you use API calls to delete specific messages previously stored in a channel's message history."},"retention":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration."}},"additionalProperties":false},"presence":{"type":"object","required":["enabled","deltas","generateLeaveOnDisconnect","streamFiltering","activeNoticeChannel","announceMax","interval","debounce","enableLegacySDKTracking","rules"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable presence"},"deltas":{"anyOf":[{"type":"boolean","description":"If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message."},{"type":"null"}]},"generateLeaveOnDisconnect":{"anyOf":[{"type":"boolean","description":"Triggers a \"leave\" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events."},{"type":"null"}]},"streamFiltering":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID)."},"activeNoticeChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers)."},"announceMax":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting \"join\", \"leave\" and \"timeout\" events. Valid range: 0-100."},"interval":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Cadence in seconds between each announcement of the channel occupancy. Valid range: 10-3600 seconds."},"debounce":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of seconds to wait before allowing implicit \"joins\" after an explicit \"leave\". Valid range: 0-60 seconds. Helps smooth out rapid state changes."},"enableLegacySDKTracking":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["INCONSISTENT"]}],"description":"Whether Presence also counts subscribe requests as liveness, on top of heartbeat requests, for every tracked rule. Defaults to false, which is heartbeat-only tracking. Enable it only when clients rely on subscribe requests to stay present - older SDKs without Event Engine, or SDKs configured with `heartbeatInterval: 0`. It applies to tracked rules only, so it may be sent on its own to toggle subscribe tracking across the current rules; untracked rules are left untouched. Sending it also rewrites every tracked rule to agree, so it resolves a keyset whose stored rules disagree on subscribe tracking. Setting it to true when no rule is tracked fails with 422, since the flag would have nothing to apply to and would read back as false. Setting it to false may always be sent on its own. Reads back as \"INCONSISTENT\" when this keyset has a pre-existing per-channel tracking configuration whose rules disagree on subscribe tracking. Set this field explicitly to the value you want applied to every tracked channel defined in `rules`, or contact PubNub support to migrate the keyset."},"rules":{"anyOf":[{"type":"array","items":{"type":"object","required":["pattern","tracking"],"properties":{"pattern":{"type":"string","description":"Channel pattern, applied to channel names on subscribe and heartbeat requests and to the channels inside a channel group on heartbeat requests. \"*\" is a wildcard matching one or more characters; every other character is matched literally. Regular expressions are not supported. Must be non-empty and at most 256 characters."},"tracking":{"anyOf":[{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}},"additionalProperties":false},{"type":"object","required":["enabled","publishEvents"],"properties":{"enabled":{"type":"boolean","enum":[true]},"publishEvents":{"type":"array","items":{"type":"string","enum":["join","leave","timeout","state-change","interval","active","inactive"]},"description":"Presence events published to the `-pnpres` channel. Whitelist: an event left out of the list is not published. An empty list keeps the channel tracked but silent, so occupancy, `hereNow` and `whereNow` still work while no event is published."}},"additionalProperties":false}],"description":"Whether Presence tracks channels matching this rule. It is needed for the channels occupancy, publishing events, using `hereNow`/`whereNow` and for Events and Actions ingestion."}},"additionalProperties":false}},{"type":"string","enum":["UNREADABLE"]}],"description":"Ordered list of rules controlling which channels Presence tracks and which events it publishes. Rules are evaluated in order and the first rule matching a channel wins, so the order is part of the configuration - the list is never sorted or deduplicated on the server. A channel matching no rule is not tracked, so a rule that disables specific channels usually needs a following catch-all rule ({ \"pattern\": \"*\", \"tracking\": { \"enabled\": true, \"publishEvents\": [\"join\", \"leave\", \"timeout\"] } }) to keep the remaining channels tracked. At least one rule is required and at most 100 are accepted; to track nothing send [{ \"pattern\": \"*\", \"tracking\": { \"enabled\": false } }]. A complete list replaces the stored rules entirely, so it can also overwrite rules this API cannot otherwise read back, such as channel-group patterns. Omit the field to leave the current rules unchanged. Reads back as \"UNREADABLE\" when this keyset has a pre-existing presence rules configuration that uses deprecated options this API cannot express. Contact PubNub support to migrate the keyset."}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"keyset":{"name":"My Production Keyset","type":"production","appId":"app_123456","id":"keyset_abc123","publishKey":"pub-c-1234567890abcdef","subscribeKey":"sub-c-1234567890abcdef","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z","secretKeys":[{"secretKey":"sec-c-1234567890abcdef","expiresAt":null}]},"config":{"accessManager":{"enabled":true,"tokenRevoke":true},"files":{"enabled":true,"retention":90,"region":"us-east-1"},"streamController":{"enabled":true,"wildcardSubscribe":true,"channelGroupLimit":50},"appContext":{"enabled":true,"userMetadataEvents":true,"channelMetadataEvents":true,"membershipEvents":true,"disallowGetAllChannelMetadata":false,"disallowGetAllUserMetadata":false,"referentialIntegrity":true,"region":"aws-iad-1"},"dataSync":{"enabled":true,"region":"us-east-1"},"apns":{"enabled":true,"teamId":"ABCD1234EF","authKeyId":"XYZ9876ABC","filename":"AuthKey_XYZ9876ABC.p8"},"fcm":{"filename":"firebase-service-account.json"},"messagePersistence":{"enabled":true,"includePresenceEvents":false,"deleteFromHistory":true,"retention":30},"presence":{"enabled":true,"deltas":true,"generateLeaveOnDisconnect":true,"streamFiltering":true,"activeNoticeChannel":null,"announceMax":20,"interval":30,"debounce":5,"enableLegacySDKTracking":false,"rules":[{"pattern":"lobby-*","tracking":{"enabled":false}},{"pattern":"chat-*","tracking":{"enabled":false}},{"pattern":"*","tracking":{"enabled":true,"publishEvents":["join","leave","timeout","state-change","interval","active","inactive"]}}]}}}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Creates a new keyset in a specified app either with default configuration or with optional configuration provided with request. For more configuration examples, see the config section of the API. In the response you will receive the keyset and the configuration with defaults set, if were not provided upon creation.\n\n      **Note:**\n      - Creating a keyset requires both `keyset:write` and `keyset-secret:read` permissions on the app. The `secretKeys` field will always be included in the creation response.\n      - Secret keys are only available at creation time and will not be returned in subsequent GET requests.\n      - files.region, appContext.region, and dataSync.region cannot be changed after initial setup.\n      - Enabling DataSync requires a configured DataSync region. Customer DataSync requests require Access Manager, which must be enabled separately using accessManager.enabled; enabling DataSync does not enable it automatically.","summary":"Create a new keyset","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["keyset"],"properties":{"keyset":{"type":"object","required":["appId"],"properties":{"name":{"type":"string","description":"A human-readable name for the keyset."},"type":{"type":"string","enum":["testing","production"],"description":"The type of the keyset, either \"testing\" or \"production\". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan."},"appId":{"type":"string","description":"The ID of the app this this keyset belongs to."}},"additionalProperties":false},"config":{"type":"object","required":[],"properties":{"accessManager":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable Access Manager"},"tokenRevoke":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token"}},"additionalProperties":false},"files":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable file sharing"},"retention":{"anyOf":[{"type":"number","enum":[1,7,30,90,180,365,0]},{"type":"null"}],"description":"Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration."},"region":{"anyOf":[{"type":"string","enum":["us-east-1","us-west-1","eu-central-1","ap-south-1","ap-northeast-1"]},{"type":"null"}],"description":"The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration."}},"additionalProperties":false},"streamController":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable stream controller"},"wildcardSubscribe":{"type":"boolean","description":"Allows subscribing to wildcard channels (eg. foo.*)"},"channelGroupLimit":{"anyOf":[{"type":"number","description":"Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100","title":"between(1, 2000)","minimum":1,"maximum":2000},{"type":"null"}]}},"additionalProperties":false},"appContext":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable app context"},"region":{"anyOf":[{"type":"string","enum":["aws-iad-1","aws-pdx-1","aws-fra-1","aws-bom-1","aws-hnd-1"]},{"type":"null"}],"description":"The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1."},"userMetadataEvents":{"type":"boolean","description":"Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database."},"channelMetadataEvents":{"type":"boolean","description":"Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes."},"membershipEvents":{"type":"boolean","description":"Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events."},"disallowGetAllChannelMetadata":{"type":"boolean","description":"If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema."},"disallowGetAllUserMetadata":{"type":"boolean","description":"If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema."},"referentialIntegrity":{"type":"boolean","description":"When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships."}},"additionalProperties":false},"dataSync":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable DataSync. Customer DataSync requests require Access Manager to be enabled separately; this setting does not enable Access Manager automatically."},"region":{"type":"string","description":"The AWS region where DataSync data is processed. Must be a configured DataSync region. Required when enabling DataSync unless a region is already set. Once set, the region cannot be changed, including while DataSync is disabled."}},"additionalProperties":false},"apns":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean"},"teamId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Team ID, 10 characters long"},{"type":"null"}]},"authKeyId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Auth Key ID, 10 characters long"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string","description":"Original filename of the token file. This only serves indentification purposes."},{"type":"null"}]},"tokenContent":{"type":"string","description":"Token file content as string (private key)","examples":["-----BEGIN PRIVATE KEY-----\nMIGT...(truncated for brevity)...END PRIVATE KEY-----\n"]}},"additionalProperties":false},"fcm":{"type":"object","required":[],"properties":{"filename":{"anyOf":[{"type":"string","description":"Original filename of the FCM key file. This only serves identification purposes."},{"type":"null"}]},"keyFile":{"type":"object","required":[],"properties":{},"additionalProperties":{"type":"string"},"description":"FCM API Key file, downloaded from the Firebase Console, JSON format"}},"additionalProperties":false},"messagePersistence":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable message persistence"},"retention":{"anyOf":[{"type":"number","enum":[1,7,30,90,180,365,0]},{"type":"null"}],"description":"Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration."},"includePresenceEvents":{"type":"boolean","description":"Store presence event messages in message history."},"deleteFromHistory":{"type":"boolean","description":"A setting that lets you use API calls to delete specific messages previously stored in a channel's message history."}},"additionalProperties":false},"presence":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable presence"},"announceMax":{"anyOf":[{"type":"number","description":"Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting \"join\", \"leave\" and \"timeout\" events.","title":"between(0, 100)","minimum":0,"maximum":100},{"type":"null"}]},"interval":{"anyOf":[{"type":"number","description":"Cadence in seconds between each announcement of the channel occupancy. Must be between 10 and 3600 seconds","title":"between(10, 3600)","minimum":10,"maximum":3600},{"type":"null"}]},"deltas":{"anyOf":[{"type":"boolean","description":"If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message."},{"type":"null"}]},"generateLeaveOnDisconnect":{"anyOf":[{"type":"boolean","description":"Triggers a \"leave\" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events."},{"type":"null"}]},"streamFiltering":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID)."},"activeNoticeChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers)."},"debounce":{"anyOf":[{"type":"number","description":"The number of seconds to wait before allowing implicit \"joins\" after an explicit \"leave\". Must be between 0 and 60 seconds. Helps smooth out rapid state changes.","title":"between(0, 60)","minimum":0,"maximum":60},{"type":"null"}]},"enableLegacySDKTracking":{"type":"boolean","description":"Whether Presence also counts subscribe requests as liveness, on top of heartbeat requests, for every tracked rule. Defaults to false, which is heartbeat-only tracking. Enable it only when clients rely on subscribe requests to stay present - older SDKs without Event Engine, or SDKs configured with `heartbeatInterval: 0`. It applies to tracked rules only, so it may be sent on its own to toggle subscribe tracking across the current rules; untracked rules are left untouched. Sending it also rewrites every tracked rule to agree, so it resolves a keyset whose stored rules disagree on subscribe tracking. Setting it to true when no rule is tracked fails with 422, since the flag would have nothing to apply to and would read back as false. Setting it to false may always be sent on its own."},"rules":{"type":"array","items":{"type":"object","required":["pattern","tracking"],"properties":{"pattern":{"type":"string","description":"Channel pattern, applied to channel names on subscribe and heartbeat requests and to the channels inside a channel group on heartbeat requests. \"*\" is a wildcard matching one or more characters; every other character is matched literally. Regular expressions are not supported. Must be non-empty and at most 256 characters.","title":"maxLength(256)","minLength":1,"maxLength":256},"tracking":{"anyOf":[{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}},"additionalProperties":false},{"type":"object","required":["enabled","publishEvents"],"properties":{"enabled":{"type":"boolean","enum":[true]},"publishEvents":{"type":"array","items":{"type":"string","enum":["join","leave","timeout","state-change","interval","active","inactive"]},"description":"Presence events published to the `-pnpres` channel. Whitelist: an event left out of the list is not published. An empty list keeps the channel tracked but silent, so occupancy, `hereNow` and `whereNow` still work while no event is published.","uniqueItems":true}},"additionalProperties":false}],"description":"Whether Presence tracks channels matching this rule. It is needed for the channels occupancy, publishing events, using `hereNow`/`whereNow` and for Events and Actions ingestion."}},"additionalProperties":false},"description":"Ordered list of rules controlling which channels Presence tracks and which events it publishes. Rules are evaluated in order and the first rule matching a channel wins, so the order is part of the configuration - the list is never sorted or deduplicated on the server. A channel matching no rule is not tracked, so a rule that disables specific channels usually needs a following catch-all rule ({ \"pattern\": \"*\", \"tracking\": { \"enabled\": true, \"publishEvents\": [\"join\", \"leave\", \"timeout\"] } }) to keep the remaining channels tracked. At least one rule is required and at most 100 are accepted; to track nothing send [{ \"pattern\": \"*\", \"tracking\": { \"enabled\": false } }]. A complete list replaces the stored rules entirely, so it can also overwrite rules this API cannot otherwise read back, such as channel-group patterns. Omit the field to leave the current rules unchanged.","title":"maxItems(100)","minItems":1,"maxItems":100}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"keyset":{"name":"My Production Keyset","type":"production","appId":"app_123456"},"config":{"accessManager":{"enabled":true,"tokenRevoke":true},"dataSync":{"enabled":true,"region":"us-east-1"}}},{"keyset":{"name":"My Production Keyset","type":"production","appId":"app_123456"}}]}}},"required":true}},"get":{"tags":["Keysets"],"operationId":"Keysets.getKeysets","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1,"description":"Parameter to specify which page to retrieve (default: 1)"},"required":false,"description":"Parameter to specify which page to retrieve (default: 1)"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"default":10,"description":"Parameter to specify number of items per page (default: 10)"},"required":false,"description":"Parameter to specify number of items per page (default: 10)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["keysets","total","page","limit"],"properties":{"keysets":{"type":"array","items":{"type":"object","required":["appId","id","publishKey","subscribeKey"],"properties":{"name":{"type":"string","description":"A human-readable name for the keyset."},"type":{"type":"string","enum":["testing","production"],"description":"The type of the keyset, either \"testing\" or \"production\". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan."},"appId":{"type":"string","description":"The ID of the app this this keyset belongs to."},"id":{"type":"string"},"publishKey":{"type":"string"},"subscribeKey":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"additionalProperties":false,"examples":[{"keysets":[{"name":"Production Keyset","type":"production","appId":"app_123456","id":"keyset_abc123","publishKey":"pub-c-1234567890abcdef","subscribeKey":"sub-c-1234567890abcdef","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"},{"name":"Testing Keyset","type":"testing","appId":"app_123456","id":"keyset_def456","publishKey":"pub-c-fedcba0987654321","subscribeKey":"sub-c-fedcba0987654321","createdAt":"2025-10-26T10:30:00Z","updatedAt":"2025-10-26T10:30:00Z"}],"total":2,"page":1,"limit":10}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves a paginated list of keysets associated with the account.","summary":"List keysets"},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/keysets/{id}":{"get":{"tags":["Keysets"],"operationId":"Keysets.getKeyset","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["appId","id","publishKey","subscribeKey"],"properties":{"name":{"type":"string","description":"A human-readable name for the keyset."},"type":{"type":"string","enum":["testing","production"],"description":"The type of the keyset, either \"testing\" or \"production\". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan."},"appId":{"type":"string","description":"The ID of the app this this keyset belongs to."},"id":{"type":"string"},"publishKey":{"type":"string"},"subscribeKey":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":false,"examples":[{"name":"My Production Keyset","type":"production","appId":"app_123456","id":"keyset_abc123","publishKey":"pub-c-1234567890abcdef","subscribeKey":"sub-c-1234567890abcdef","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves a single keyset by its ID.","summary":"Get keyset by ID"},"delete":{"tags":["Keysets"],"operationId":"Keysets.deleteKeyset","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}},"additionalProperties":false,"examples":[{"success":true}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"summary":"Delete a keyset"},"patch":{"tags":["Keysets"],"operationId":"Keysets.updateKeyset","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["appId","id","publishKey","subscribeKey"],"properties":{"name":{"type":"string","description":"A human-readable name for the keyset."},"type":{"type":"string","enum":["testing","production"],"description":"The type of the keyset, either \"testing\" or \"production\". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan."},"appId":{"type":"string","description":"The ID of the app this this keyset belongs to."},"id":{"type":"string"},"publishKey":{"type":"string"},"subscribeKey":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":false,"examples":[{"name":"My Production Keyset","type":"production","appId":"app_123456","id":"keyset_abc123","publishKey":"pub-c-1234567890abcdef","subscribeKey":"sub-c-1234567890abcdef","createdAt":"2025-10-27T12:00:00Z","updatedAt":"2025-10-27T12:00:00Z"}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Updates a keyset's name and/or type. At least one field must be provided.\n\n      **Note:**\n      - Updating a keyset from testing to production requires a paid plan","summary":"Update keyset name and/or type","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"name":{"type":"string","description":"A human-readable name for the keyset."},"type":{"type":"string","enum":["testing","production"],"description":"The type of the keyset, either \"testing\" or \"production\". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan."}},"additionalProperties":false,"minProperties":1}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/keysets/{id}/config":{"get":{"tags":["Config"],"operationId":"Config.getKeysetConfigV2","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["accessManager","files","streamController","appContext","dataSync","apns","fcm","messagePersistence","presence"],"properties":{"accessManager":{"type":"object","required":["enabled","tokenRevoke"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable Access Manager"},"tokenRevoke":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token"}},"additionalProperties":false},"files":{"type":"object","required":["enabled","retention","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable file sharing"},"retention":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration."}},"additionalProperties":false},"streamController":{"type":"object","required":["enabled","wildcardSubscribe","channelGroupLimit"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable stream controller"},"wildcardSubscribe":{"type":"boolean","description":"Allows subscribing to wildcard channels (eg. foo.*)"},"channelGroupLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100"}},"additionalProperties":false},"appContext":{"type":"object","required":["enabled","userMetadataEvents","channelMetadataEvents","membershipEvents","disallowGetAllChannelMetadata","disallowGetAllUserMetadata","referentialIntegrity","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable app context"},"userMetadataEvents":{"type":"boolean","description":"Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database."},"channelMetadataEvents":{"type":"boolean","description":"Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes."},"membershipEvents":{"type":"boolean","description":"Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events."},"disallowGetAllChannelMetadata":{"type":"boolean","description":"If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema."},"disallowGetAllUserMetadata":{"type":"boolean","description":"If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema."},"referentialIntegrity":{"type":"boolean","description":"When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1."}},"additionalProperties":false},"dataSync":{"type":"object","required":["enabled","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable DataSync. Customer DataSync requests require Access Manager to be enabled separately; this setting does not enable Access Manager automatically."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The configured DataSync AWS region, or null if no region has been set. Disabling DataSync preserves the region; once set, it cannot be changed."}},"additionalProperties":false},"apns":{"type":"object","required":["enabled","teamId","authKeyId","filename"],"properties":{"enabled":{"type":"boolean"},"teamId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Team ID, 10 characters long"},{"type":"null"}]},"authKeyId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Auth Key ID, 10 characters long"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string","description":"Original filename of the token file. This only serves indentification purposes."},{"type":"null"}]}},"additionalProperties":false,"description":"Connection details for APNs when you use it as a push service provider to deliver push notifications to your application. https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns.  On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename."},"fcm":{"type":"object","required":["filename"],"properties":{"filename":{"anyOf":[{"type":"string","description":"Original filename of the FCM key file. This only serves identification purposes."},{"type":"null"}]}},"additionalProperties":false,"description":"Connection details for FCM when you use it as a push service provider to deliver push notifications to your application. https://firebase.google.com/docs/cloud-messaging. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename."},"messagePersistence":{"type":"object","required":["enabled","includePresenceEvents","deleteFromHistory","retention"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable message persistence"},"includePresenceEvents":{"type":"boolean","description":"Store presence event messages in message history."},"deleteFromHistory":{"type":"boolean","description":"A setting that lets you use API calls to delete specific messages previously stored in a channel's message history."},"retention":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration."}},"additionalProperties":false},"presence":{"type":"object","required":["enabled","deltas","generateLeaveOnDisconnect","streamFiltering","activeNoticeChannel","announceMax","interval","debounce","enableLegacySDKTracking","rules"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable presence"},"deltas":{"anyOf":[{"type":"boolean","description":"If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message."},{"type":"null"}]},"generateLeaveOnDisconnect":{"anyOf":[{"type":"boolean","description":"Triggers a \"leave\" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events."},{"type":"null"}]},"streamFiltering":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID)."},"activeNoticeChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers)."},"announceMax":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting \"join\", \"leave\" and \"timeout\" events. Valid range: 0-100."},"interval":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Cadence in seconds between each announcement of the channel occupancy. Valid range: 10-3600 seconds."},"debounce":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of seconds to wait before allowing implicit \"joins\" after an explicit \"leave\". Valid range: 0-60 seconds. Helps smooth out rapid state changes."},"enableLegacySDKTracking":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["INCONSISTENT"]}],"description":"Whether Presence also counts subscribe requests as liveness, on top of heartbeat requests, for every tracked rule. Defaults to false, which is heartbeat-only tracking. Enable it only when clients rely on subscribe requests to stay present - older SDKs without Event Engine, or SDKs configured with `heartbeatInterval: 0`. It applies to tracked rules only, so it may be sent on its own to toggle subscribe tracking across the current rules; untracked rules are left untouched. Sending it also rewrites every tracked rule to agree, so it resolves a keyset whose stored rules disagree on subscribe tracking. Setting it to true when no rule is tracked fails with 422, since the flag would have nothing to apply to and would read back as false. Setting it to false may always be sent on its own. Reads back as \"INCONSISTENT\" when this keyset has a pre-existing per-channel tracking configuration whose rules disagree on subscribe tracking. Set this field explicitly to the value you want applied to every tracked channel defined in `rules`, or contact PubNub support to migrate the keyset."},"rules":{"anyOf":[{"type":"array","items":{"type":"object","required":["pattern","tracking"],"properties":{"pattern":{"type":"string","description":"Channel pattern, applied to channel names on subscribe and heartbeat requests and to the channels inside a channel group on heartbeat requests. \"*\" is a wildcard matching one or more characters; every other character is matched literally. Regular expressions are not supported. Must be non-empty and at most 256 characters."},"tracking":{"anyOf":[{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}},"additionalProperties":false},{"type":"object","required":["enabled","publishEvents"],"properties":{"enabled":{"type":"boolean","enum":[true]},"publishEvents":{"type":"array","items":{"type":"string","enum":["join","leave","timeout","state-change","interval","active","inactive"]},"description":"Presence events published to the `-pnpres` channel. Whitelist: an event left out of the list is not published. An empty list keeps the channel tracked but silent, so occupancy, `hereNow` and `whereNow` still work while no event is published."}},"additionalProperties":false}],"description":"Whether Presence tracks channels matching this rule. It is needed for the channels occupancy, publishing events, using `hereNow`/`whereNow` and for Events and Actions ingestion."}},"additionalProperties":false}},{"type":"string","enum":["UNREADABLE"]}],"description":"Ordered list of rules controlling which channels Presence tracks and which events it publishes. Rules are evaluated in order and the first rule matching a channel wins, so the order is part of the configuration - the list is never sorted or deduplicated on the server. A channel matching no rule is not tracked, so a rule that disables specific channels usually needs a following catch-all rule ({ \"pattern\": \"*\", \"tracking\": { \"enabled\": true, \"publishEvents\": [\"join\", \"leave\", \"timeout\"] } }) to keep the remaining channels tracked. At least one rule is required and at most 100 are accepted; to track nothing send [{ \"pattern\": \"*\", \"tracking\": { \"enabled\": false } }]. A complete list replaces the stored rules entirely, so it can also overwrite rules this API cannot otherwise read back, such as channel-group patterns. Omit the field to leave the current rules unchanged. Reads back as \"UNREADABLE\" when this keyset has a pre-existing presence rules configuration that uses deprecated options this API cannot express. Contact PubNub support to migrate the keyset."}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"accessManager":{"enabled":true,"tokenRevoke":true},"files":{"enabled":true,"retention":90,"region":"us-east-1"},"streamController":{"enabled":true,"wildcardSubscribe":true,"channelGroupLimit":50},"appContext":{"enabled":true,"userMetadataEvents":true,"channelMetadataEvents":true,"membershipEvents":true,"disallowGetAllChannelMetadata":false,"disallowGetAllUserMetadata":false,"referentialIntegrity":true,"region":"aws-iad-1"},"dataSync":{"enabled":true,"region":"us-east-1"},"apns":{"enabled":true,"teamId":"ABCD1234EF","authKeyId":"XYZ9876ABC","filename":"AuthKey_XYZ9876ABC.p8"},"fcm":{"filename":"firebase-service-account.json"},"messagePersistence":{"enabled":true,"includePresenceEvents":false,"deleteFromHistory":true,"retention":30},"presence":{"enabled":true,"deltas":true,"generateLeaveOnDisconnect":true,"streamFiltering":true,"activeNoticeChannel":null,"announceMax":20,"interval":30,"debounce":5,"enableLegacySDKTracking":false,"rules":[{"pattern":"lobby-*","tracking":{"enabled":false}},{"pattern":"chat-*","tracking":{"enabled":false}},{"pattern":"*","tracking":{"enabled":true,"publishEvents":["join","leave","timeout","state-change","interval","active","inactive"]}}]}}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves the complete configuration for a specific keyset, including the default values.","summary":"Get keyset configuration"},"patch":{"tags":["Config"],"operationId":"Config.updateKeysetConfigV2","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["accessManager","files","streamController","appContext","dataSync","apns","fcm","messagePersistence","presence"],"properties":{"accessManager":{"type":"object","required":["enabled","tokenRevoke"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable Access Manager"},"tokenRevoke":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token"}},"additionalProperties":false},"files":{"type":"object","required":["enabled","retention","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable file sharing"},"retention":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration."}},"additionalProperties":false},"streamController":{"type":"object","required":["enabled","wildcardSubscribe","channelGroupLimit"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable stream controller"},"wildcardSubscribe":{"type":"boolean","description":"Allows subscribing to wildcard channels (eg. foo.*)"},"channelGroupLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100"}},"additionalProperties":false},"appContext":{"type":"object","required":["enabled","userMetadataEvents","channelMetadataEvents","membershipEvents","disallowGetAllChannelMetadata","disallowGetAllUserMetadata","referentialIntegrity","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable app context"},"userMetadataEvents":{"type":"boolean","description":"Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database."},"channelMetadataEvents":{"type":"boolean","description":"Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes."},"membershipEvents":{"type":"boolean","description":"Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events."},"disallowGetAllChannelMetadata":{"type":"boolean","description":"If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema."},"disallowGetAllUserMetadata":{"type":"boolean","description":"If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema."},"referentialIntegrity":{"type":"boolean","description":"When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1."}},"additionalProperties":false},"dataSync":{"type":"object","required":["enabled","region"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable DataSync. Customer DataSync requests require Access Manager to be enabled separately; this setting does not enable Access Manager automatically."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The configured DataSync AWS region, or null if no region has been set. Disabling DataSync preserves the region; once set, it cannot be changed."}},"additionalProperties":false},"apns":{"type":"object","required":["enabled","teamId","authKeyId","filename"],"properties":{"enabled":{"type":"boolean"},"teamId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Team ID, 10 characters long"},{"type":"null"}]},"authKeyId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Auth Key ID, 10 characters long"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string","description":"Original filename of the token file. This only serves indentification purposes."},{"type":"null"}]}},"additionalProperties":false,"description":"Connection details for APNs when you use it as a push service provider to deliver push notifications to your application. https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns.  On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename."},"fcm":{"type":"object","required":["filename"],"properties":{"filename":{"anyOf":[{"type":"string","description":"Original filename of the FCM key file. This only serves identification purposes."},{"type":"null"}]}},"additionalProperties":false,"description":"Connection details for FCM when you use it as a push service provider to deliver push notifications to your application. https://firebase.google.com/docs/cloud-messaging. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename."},"messagePersistence":{"type":"object","required":["enabled","includePresenceEvents","deleteFromHistory","retention"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable message persistence"},"includePresenceEvents":{"type":"boolean","description":"Store presence event messages in message history."},"deleteFromHistory":{"type":"boolean","description":"A setting that lets you use API calls to delete specific messages previously stored in a channel's message history."},"retention":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration."}},"additionalProperties":false},"presence":{"type":"object","required":["enabled","deltas","generateLeaveOnDisconnect","streamFiltering","activeNoticeChannel","announceMax","interval","debounce","enableLegacySDKTracking","rules"],"properties":{"enabled":{"type":"boolean","description":"Enable or disable presence"},"deltas":{"anyOf":[{"type":"boolean","description":"If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message."},{"type":"null"}]},"generateLeaveOnDisconnect":{"anyOf":[{"type":"boolean","description":"Triggers a \"leave\" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events."},{"type":"null"}]},"streamFiltering":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID)."},"activeNoticeChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers)."},"announceMax":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting \"join\", \"leave\" and \"timeout\" events. Valid range: 0-100."},"interval":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Cadence in seconds between each announcement of the channel occupancy. Valid range: 10-3600 seconds."},"debounce":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of seconds to wait before allowing implicit \"joins\" after an explicit \"leave\". Valid range: 0-60 seconds. Helps smooth out rapid state changes."},"enableLegacySDKTracking":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["INCONSISTENT"]}],"description":"Whether Presence also counts subscribe requests as liveness, on top of heartbeat requests, for every tracked rule. Defaults to false, which is heartbeat-only tracking. Enable it only when clients rely on subscribe requests to stay present - older SDKs without Event Engine, or SDKs configured with `heartbeatInterval: 0`. It applies to tracked rules only, so it may be sent on its own to toggle subscribe tracking across the current rules; untracked rules are left untouched. Sending it also rewrites every tracked rule to agree, so it resolves a keyset whose stored rules disagree on subscribe tracking. Setting it to true when no rule is tracked fails with 422, since the flag would have nothing to apply to and would read back as false. Setting it to false may always be sent on its own. Reads back as \"INCONSISTENT\" when this keyset has a pre-existing per-channel tracking configuration whose rules disagree on subscribe tracking. Set this field explicitly to the value you want applied to every tracked channel defined in `rules`, or contact PubNub support to migrate the keyset."},"rules":{"anyOf":[{"type":"array","items":{"type":"object","required":["pattern","tracking"],"properties":{"pattern":{"type":"string","description":"Channel pattern, applied to channel names on subscribe and heartbeat requests and to the channels inside a channel group on heartbeat requests. \"*\" is a wildcard matching one or more characters; every other character is matched literally. Regular expressions are not supported. Must be non-empty and at most 256 characters."},"tracking":{"anyOf":[{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}},"additionalProperties":false},{"type":"object","required":["enabled","publishEvents"],"properties":{"enabled":{"type":"boolean","enum":[true]},"publishEvents":{"type":"array","items":{"type":"string","enum":["join","leave","timeout","state-change","interval","active","inactive"]},"description":"Presence events published to the `-pnpres` channel. Whitelist: an event left out of the list is not published. An empty list keeps the channel tracked but silent, so occupancy, `hereNow` and `whereNow` still work while no event is published."}},"additionalProperties":false}],"description":"Whether Presence tracks channels matching this rule. It is needed for the channels occupancy, publishing events, using `hereNow`/`whereNow` and for Events and Actions ingestion."}},"additionalProperties":false}},{"type":"string","enum":["UNREADABLE"]}],"description":"Ordered list of rules controlling which channels Presence tracks and which events it publishes. Rules are evaluated in order and the first rule matching a channel wins, so the order is part of the configuration - the list is never sorted or deduplicated on the server. A channel matching no rule is not tracked, so a rule that disables specific channels usually needs a following catch-all rule ({ \"pattern\": \"*\", \"tracking\": { \"enabled\": true, \"publishEvents\": [\"join\", \"leave\", \"timeout\"] } }) to keep the remaining channels tracked. At least one rule is required and at most 100 are accepted; to track nothing send [{ \"pattern\": \"*\", \"tracking\": { \"enabled\": false } }]. A complete list replaces the stored rules entirely, so it can also overwrite rules this API cannot otherwise read back, such as channel-group patterns. Omit the field to leave the current rules unchanged. Reads back as \"UNREADABLE\" when this keyset has a pre-existing presence rules configuration that uses deprecated options this API cannot express. Contact PubNub support to migrate the keyset."}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"accessManager":{"enabled":true,"tokenRevoke":true},"files":{"enabled":true,"retention":90,"region":"us-east-1"},"streamController":{"enabled":true,"wildcardSubscribe":true,"channelGroupLimit":50},"appContext":{"enabled":true,"userMetadataEvents":true,"channelMetadataEvents":true,"membershipEvents":true,"disallowGetAllChannelMetadata":false,"disallowGetAllUserMetadata":false,"referentialIntegrity":true,"region":"aws-iad-1"},"dataSync":{"enabled":true,"region":"us-east-1"},"apns":{"enabled":true,"teamId":"ABCD1234EF","authKeyId":"XYZ9876ABC","filename":"AuthKey_XYZ9876ABC.p8"},"fcm":{"filename":"firebase-service-account.json"},"messagePersistence":{"enabled":true,"includePresenceEvents":false,"deleteFromHistory":true,"retention":30},"presence":{"enabled":true,"deltas":true,"generateLeaveOnDisconnect":true,"streamFiltering":true,"activeNoticeChannel":null,"announceMax":20,"interval":30,"debounce":5,"enableLegacySDKTracking":false,"rules":[{"pattern":"lobby-*","tracking":{"enabled":false}},{"pattern":"chat-*","tracking":{"enabled":false}},{"pattern":"*","tracking":{"enabled":true,"publishEvents":["join","leave","timeout","state-change","interval","active","inactive"]}}]}}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"422":{"description":"UnsupportedPresenceRulesError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedPresenceRulesError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Updates the configuration for a specific keyset. This is a partial update - only the provided fields will be updated - other fields will remain unchanged.","summary":"Update keyset configuration","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"accessManager":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable Access Manager"},"tokenRevoke":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token"}},"additionalProperties":false},"files":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable file sharing"},"retention":{"anyOf":[{"type":"number","enum":[1,7,30,90,180,365,0]},{"type":"null"}],"description":"Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration."},"region":{"anyOf":[{"type":"string","enum":["us-east-1","us-west-1","eu-central-1","ap-south-1","ap-northeast-1"]},{"type":"null"}],"description":"The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration."}},"additionalProperties":false},"streamController":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable stream controller"},"wildcardSubscribe":{"type":"boolean","description":"Allows subscribing to wildcard channels (eg. foo.*)"},"channelGroupLimit":{"anyOf":[{"type":"number","description":"Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100","title":"between(1, 2000)","minimum":1,"maximum":2000},{"type":"null"}]}},"additionalProperties":false},"appContext":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable app context"},"region":{"anyOf":[{"type":"string","enum":["aws-iad-1","aws-pdx-1","aws-fra-1","aws-bom-1","aws-hnd-1"]},{"type":"null"}],"description":"The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1."},"userMetadataEvents":{"type":"boolean","description":"Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database."},"channelMetadataEvents":{"type":"boolean","description":"Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes."},"membershipEvents":{"type":"boolean","description":"Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events."},"disallowGetAllChannelMetadata":{"type":"boolean","description":"If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema."},"disallowGetAllUserMetadata":{"type":"boolean","description":"If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema."},"referentialIntegrity":{"type":"boolean","description":"When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships."}},"additionalProperties":false},"dataSync":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable DataSync. Customer DataSync requests require Access Manager to be enabled separately; this setting does not enable Access Manager automatically."},"region":{"type":"string","description":"The AWS region where DataSync data is processed. Must be a configured DataSync region. Required when enabling DataSync unless a region is already set. Once set, the region cannot be changed, including while DataSync is disabled."}},"additionalProperties":false},"apns":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean"},"teamId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Team ID, 10 characters long"},{"type":"null"}]},"authKeyId":{"anyOf":[{"type":"string","description":"Apple Push Notification service Auth Key ID, 10 characters long"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string","description":"Original filename of the token file. This only serves indentification purposes."},{"type":"null"}]},"tokenContent":{"type":"string","description":"Token file content as string (private key)","examples":["-----BEGIN PRIVATE KEY-----\nMIGT...(truncated for brevity)...END PRIVATE KEY-----\n"]}},"additionalProperties":false},"fcm":{"type":"object","required":[],"properties":{"filename":{"anyOf":[{"type":"string","description":"Original filename of the FCM key file. This only serves identification purposes."},{"type":"null"}]},"keyFile":{"type":"object","required":[],"properties":{},"additionalProperties":{"type":"string"},"description":"FCM API Key file, downloaded from the Firebase Console, JSON format"}},"additionalProperties":false},"messagePersistence":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable message persistence"},"retention":{"anyOf":[{"type":"number","enum":[1,7,30,90,180,365,0]},{"type":"null"}],"description":"Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration."},"includePresenceEvents":{"type":"boolean","description":"Store presence event messages in message history."},"deleteFromHistory":{"type":"boolean","description":"A setting that lets you use API calls to delete specific messages previously stored in a channel's message history."}},"additionalProperties":false},"presence":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable presence"},"announceMax":{"anyOf":[{"type":"number","description":"Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting \"join\", \"leave\" and \"timeout\" events.","title":"between(0, 100)","minimum":0,"maximum":100},{"type":"null"}]},"interval":{"anyOf":[{"type":"number","description":"Cadence in seconds between each announcement of the channel occupancy. Must be between 10 and 3600 seconds","title":"between(10, 3600)","minimum":10,"maximum":3600},{"type":"null"}]},"deltas":{"anyOf":[{"type":"boolean","description":"If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message."},{"type":"null"}]},"generateLeaveOnDisconnect":{"anyOf":[{"type":"boolean","description":"Triggers a \"leave\" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events."},{"type":"null"}]},"streamFiltering":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID)."},"activeNoticeChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers)."},"debounce":{"anyOf":[{"type":"number","description":"The number of seconds to wait before allowing implicit \"joins\" after an explicit \"leave\". Must be between 0 and 60 seconds. Helps smooth out rapid state changes.","title":"between(0, 60)","minimum":0,"maximum":60},{"type":"null"}]},"enableLegacySDKTracking":{"type":"boolean","description":"Whether Presence also counts subscribe requests as liveness, on top of heartbeat requests, for every tracked rule. Defaults to false, which is heartbeat-only tracking. Enable it only when clients rely on subscribe requests to stay present - older SDKs without Event Engine, or SDKs configured with `heartbeatInterval: 0`. It applies to tracked rules only, so it may be sent on its own to toggle subscribe tracking across the current rules; untracked rules are left untouched. Sending it also rewrites every tracked rule to agree, so it resolves a keyset whose stored rules disagree on subscribe tracking. Setting it to true when no rule is tracked fails with 422, since the flag would have nothing to apply to and would read back as false. Setting it to false may always be sent on its own."},"rules":{"type":"array","items":{"type":"object","required":["pattern","tracking"],"properties":{"pattern":{"type":"string","description":"Channel pattern, applied to channel names on subscribe and heartbeat requests and to the channels inside a channel group on heartbeat requests. \"*\" is a wildcard matching one or more characters; every other character is matched literally. Regular expressions are not supported. Must be non-empty and at most 256 characters.","title":"maxLength(256)","minLength":1,"maxLength":256},"tracking":{"anyOf":[{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}},"additionalProperties":false},{"type":"object","required":["enabled","publishEvents"],"properties":{"enabled":{"type":"boolean","enum":[true]},"publishEvents":{"type":"array","items":{"type":"string","enum":["join","leave","timeout","state-change","interval","active","inactive"]},"description":"Presence events published to the `-pnpres` channel. Whitelist: an event left out of the list is not published. An empty list keeps the channel tracked but silent, so occupancy, `hereNow` and `whereNow` still work while no event is published.","uniqueItems":true}},"additionalProperties":false}],"description":"Whether Presence tracks channels matching this rule. It is needed for the channels occupancy, publishing events, using `hereNow`/`whereNow` and for Events and Actions ingestion."}},"additionalProperties":false},"description":"Ordered list of rules controlling which channels Presence tracks and which events it publishes. Rules are evaluated in order and the first rule matching a channel wins, so the order is part of the configuration - the list is never sorted or deduplicated on the server. A channel matching no rule is not tracked, so a rule that disables specific channels usually needs a following catch-all rule ({ \"pattern\": \"*\", \"tracking\": { \"enabled\": true, \"publishEvents\": [\"join\", \"leave\", \"timeout\"] } }) to keep the remaining channels tracked. At least one rule is required and at most 100 are accepted; to track nothing send [{ \"pattern\": \"*\", \"tracking\": { \"enabled\": false } }]. A complete list replaces the stored rules entirely, so it can also overwrite rules this API cannot otherwise read back, such as channel-group patterns. Omit the field to leave the current rules unchanged.","title":"maxItems(100)","minItems":1,"maxItems":100}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"accessManager":{"enabled":true,"tokenRevoke":true},"appContext":{"enabled":true,"disallowGetAllChannelMetadata":true}},{"accessManager":{"enabled":true},"dataSync":{"enabled":true,"region":"us-east-1"}},{"apns":{"enabled":true,"teamId":"TEAM123ABC","authKeyId":"KEY456DEF","filename":"AuthKey_KEY456DEF.p8","tokenContent":"-----BEGIN PRIVATE KEY-----\nMIGT...(truncated for brevity)...END PRIVATE KEY-----\n"}},{"fcm":{"filename":"my-firebase-project.json","keyFile":{"type":"service_account","project_id":"my-firebase-project","private_key_id":"abc123def456","private_key":"-----BEGIN PRIVATE KEY-----\n...(truncated)...END PRIVATE KEY-----\n","client_email":"firebase-adminsdk-abc@my-firebase-project.iam.gserviceaccount.com","client_id":"123456789012345678901"}}},{"presence":{"enableLegacySDKTracking":false,"rules":[{"pattern":"lobby-*","tracking":{"enabled":false}},{"pattern":"chat-*","tracking":{"enabled":false}},{"pattern":"*","tracking":{"enabled":true,"publishEvents":["join","leave","timeout","state-change","interval","active","inactive"]}}]}},{"presence":{"enableLegacySDKTracking":false,"rules":[{"pattern":"personal-*","tracking":{"enabled":true,"publishEvents":["join","leave","timeout"]}}]}},{"presence":{"rules":[{"pattern":"*","tracking":{"enabled":false}}]}}]}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/keysets/{keysetId}/secret-keys":{"get":{"tags":["Secret Keys"],"operationId":"Secret Keys.getSecretKeys","parameters":[{"name":"keysetId","in":"path","schema":{"type":"integer"},"required":true},{"name":"activeOnly","in":"query","schema":{"allOf":[{"$ref":"#/components/schemas/BooleanFromString"}],"description":"Filter by active status. When true, returns only active secret keys. When false, returns all secret keys including expired ones. Default: false"},"required":false,"description":"Filter by active status. When true, returns only active secret keys. When false, returns all secret keys including expired ones. Default: false"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["secretKeys"],"properties":{"secretKeys":{"type":"array","items":{"type":"object","required":["secretKey","expiresAt"],"properties":{"secretKey":{"type":"string","description":"The secret key value"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"null"}],"description":"Expiration timestamp in ISO 8601 UTC format (e.g., \"2025-12-31T23:59:59Z\"). Null means the secret key never expires."}},"additionalProperties":false}}},"additionalProperties":false,"examples":[{"secretKeys":[{"secretKey":"sec-c-abc123","expiresAt":"2025-12-31T23:59:59Z"},{"secretKey":"sec-c-def456","expiresAt":null}]}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves all secret keys associated with a keyset. By default, all secret keys (including expired ones) are returned. Set `activeOnly=true` to return only active secret keys.","summary":"List secret keys for a keyset"},"post":{"tags":["Secret Keys"],"operationId":"Secret Keys.createSecretKey","parameters":[{"name":"keysetId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["secretKey"],"properties":{"secretKey":{"type":"string","description":"The newly generated non-expiring secret key for the keyset"}},"additionalProperties":false,"examples":[{"secretKey":"sec-c-abcd123"}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Rotates the keyset's secret key. Supports two rotation modes depending on whether an expiration time is provided:\n\n**Rotation with Overlap (paid plan required):**\nWhen `expiresAt` is provided:\n1. The current permanent secret key is assigned the specified expiration time\n2. A new permanent (non-expiring) secret key becomes the current key and is returned in the response\n3. You may replace the previous secret key with the new one without downtime.\n\nRequirements:\n- Requires a paid plan\n- Maximum 5 rotated secret keys per keyset\n- Expiration must be at least 60 seconds in the future\n- Expiration must be at most 366 days in the future\n\n**Immediate Rotation:**\nWhen `expiresAt` is NOT provided:\n1. The current secret key is immediately replaced with a new randomly generated secret key\n2. The old secret key becomes invalid\n3. There is no overlap period. We recommend you use this in development and testing environments","summary":"Rotate secret key","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$","description":"Optional expiration time for rotation in ISO 8601 UTC format (e.g., \"2025-12-31T23:59:59Z\"). When provided: Performs rotation with overlap - the current secret key becomes time-limited and a new permanent key is generated - available only for paid plans. Must be at least 60 seconds in the future and at most 366 days in the future. When omitted: Performs immediate rotation - replaces the current secret key instantly without an overlap period (suitable for free accounts)."}},"additionalProperties":false}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/keysets/{keysetId}/secret-keys/{secretKeyPrefix}":{"delete":{"tags":["Secret Keys"],"operationId":"Secret Keys.deleteSecretKey","parameters":[{"name":"keysetId","in":"path","schema":{"type":"integer"},"required":true},{"name":"secretKeyPrefix","in":"path","schema":{"type":"string","description":"prefix in format `sec-c-{5chars}`. Don't provide the full secret key.","title":"Secret Key Prefix","examples":["sec-c-hm39c","sec-c-abc12"],"pattern":"^sec-c-[a-zA-Z0-9]{5}$"},"required":true,"description":"prefix in format `sec-c-{5chars}`. Don't provide the full secret key."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}},"additionalProperties":false,"examples":[{"success":true}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Deletes a rotated secret key.\n\n**Requirements:**\n- Secret key prefix must be in format `sec-c-{5chars}` (exactly 5 alphanumeric characters)\n- Requested secret key must already have expiration date","summary":"Delete a rotated secret key"},"patch":{"tags":["Secret Keys"],"operationId":"Secret Keys.updateSecretKey","parameters":[{"name":"keysetId","in":"path","schema":{"type":"integer"},"required":true},{"name":"secretKeyPrefix","in":"path","schema":{"type":"string","description":"prefix in format `sec-c-{5chars}`. Don't provide the full secret key.","title":"Secret Key Prefix","examples":["sec-c-hm39c","sec-c-abc12"],"pattern":"^sec-c-[a-zA-Z0-9]{5}$"},"required":true,"description":"prefix in format `sec-c-{5chars}`. Don't provide the full secret key."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["secretKey"],"properties":{"secretKey":{"type":"object","required":["secretKey","expiresAt"],"properties":{"secretKey":{"type":"string","description":"The secret key value"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"null"}],"description":"Expiration timestamp in ISO 8601 UTC format (e.g., \"2025-12-31T23:59:59Z\"). Null means the secret key never expires."}},"additionalProperties":false}},"additionalProperties":false,"examples":[{"secretKey":{"secretKey":"sec-c-xyz789","expiresAt":"2026-01-31T23:59:59Z"}}]}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/PaidPlanRequiredError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Updates the expiration time of a rotated secret key.\n\n**Requirements:**\n- A paid plan\n- Secret key prefix must be in format `sec-c-{5chars}` (exactly 5 alphanumeric characters)\n- Requested secret key must already have an expiration date\n- New expiration must be at least 60 seconds in the future\n- New expiration must be at most 366 days in the future","summary":"Update secret key expiration time","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["expiresAt"],"properties":{"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"}},"additionalProperties":false}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/customers":{"get":{"tags":["OEM Customer"],"operationId":"OEM Customer.list","parameters":[{"name":"appId","in":"query","schema":{"type":"string","description":"Optional application ID to filter customers by application"},"required":false,"description":"Optional application ID to filter customers by application"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"array","items":{"type":"object","required":["id","externalId","name","created","updated","appCount","keysetCount"],"properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"created":{"$ref":"#/components/schemas/Date"},"updated":{"$ref":"#/components/schemas/Date"},"appCount":{"type":"number"},"keysetCount":{"type":"number"}},"additionalProperties":false}}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves a list of all OEM customers in your partner account with summary information.\n\n**Filtering:**\n- Use the optional `appId` query parameter to filter customers who have keysets in a specific application\n- Without filtering, returns all customers across all applications","summary":"List all customers"},"post":{"tags":["OEM Customer"],"operationId":"OEM Customer.add","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["id","externalId","name","created","updated","keysets"],"properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"created":{"$ref":"#/components/schemas/Date"},"updated":{"$ref":"#/components/schemas/Date"},"keysets":{"type":"array","items":{"type":"object","required":["id","assignedAt"],"properties":{"id":{"type":"number"},"assignedAt":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Creates a new OEM customer record in your partner account.\n\n**Best practices:**\n- Use your own customer/tenant ID as the `externalId` for easy cross-referencing\n- The `externalId` must be unique across your account\n- You can assign keysets during creation or add them later via the assign keysets endpoint","summary":"Create a new customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["externalId","name"],"properties":{"externalId":{"type":"string","description":"A unique external identifier for the customer (URL-safe alphanumeric, hyphens, and underscores)","pattern":"^[a-zA-Z0-9_-]+$","title":"maxLength(255)","maxLength":255},"keysetIds":{"type":"array","items":{"type":"number"},"description":"Optional array of keyset IDs to assign to the customer upon creation"},"name":{"type":"string","description":"The display name for the customer (max 255 characters)","title":"maxLength(255)","maxLength":255}},"additionalProperties":false}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/customers/{customerId}":{"get":{"tags":["OEM Customer"],"operationId":"OEM Customer.getById","parameters":[{"name":"customerId","in":"path","schema":{"type":"string","description":"The unique identifier of the customer"},"required":true,"description":"The unique identifier of the customer"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["id","externalId","name","created","updated","keysets"],"properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"created":{"$ref":"#/components/schemas/Date"},"updated":{"$ref":"#/components/schemas/Date"},"keysets":{"type":"array","items":{"type":"object","required":["id","assignedAt"],"properties":{"id":{"type":"number"},"assignedAt":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves detailed information about a specific OEM customer, including all their assigned keysets.","summary":"Get customer by ID"},"put":{"tags":["OEM Customer"],"operationId":"OEM Customer.edit","parameters":[{"name":"customerId","in":"path","schema":{"type":"string","description":"The unique identifier of the customer to update"},"required":true,"description":"The unique identifier of the customer to update"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["id","externalId","name","created","updated","keysets"],"properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"created":{"$ref":"#/components/schemas/Date"},"updated":{"$ref":"#/components/schemas/Date"},"keysets":{"type":"array","items":{"type":"object","required":["id","assignedAt"],"properties":{"id":{"type":"number"},"assignedAt":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Updates an existing OEM customer's display name.","summary":"Update customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"name":{"type":"string","description":"The updated display name for the customer (max 255 characters)","title":"maxLength(255)","maxLength":255}},"additionalProperties":false}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/keysets":{"get":{"tags":["OEM Customer"],"operationId":"OEM Customer.keysets","parameters":[{"name":"customerId","in":"query","schema":{"type":"string","description":"The unique identifier of the customer"},"required":true,"description":"The unique identifier of the customer"},{"name":"appId","in":"query","schema":{"type":"string","description":"Optional application ID to filter keysets by application"},"required":false,"description":"Optional application ID to filter keysets by application"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"array","items":{"type":"object","required":["id","assignedAt"],"properties":{"id":{"type":"number"},"assignedAt":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false}}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves all keysets assigned to a specific OEM customer.\n\n**Optional filtering:**\n- `appId`: Filter results to show only keysets within a specific application","summary":"List keysets for customer"},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/keysets/{keysetId}/customer":{"get":{"tags":["OEM Customer"],"operationId":"OEM Customer.getByKeyset","parameters":[{"name":"keysetId","in":"path","schema":{"type":"string","description":"The keyset ID to lookup the owning customer"},"required":true,"description":"The keyset ID to lookup the owning customer"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["id","externalId","name","created","updated"],"properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"created":{"$ref":"#/components/schemas/Date"},"updated":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Returns the owner of a specific keyset. Useful when you have a keyset ID and need to identify the associated customer.","summary":"Get customer by keyset"},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/customers/{customerId}/applications":{"get":{"tags":["OEM Customer"],"operationId":"OEM Customer.listApplicationsByCustomer","parameters":[{"name":"customerId","in":"path","schema":{"type":"string","description":"The unique identifier of the customer"},"required":true,"description":"The unique identifier of the customer"},{"name":"page","in":"query","schema":{"type":"string","description":"a string to be decoded into a number"},"required":false,"description":"a string to be decoded into a number"},{"name":"pageSize","in":"query","schema":{"allOf":[{"$ref":"#/components/schemas/NumberFromString"}],"description":"Number of results per page (1-100)"},"required":false,"description":"Number of results per page (1-100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"array","items":{"type":"object","required":["id","accountId"],"properties":{"id":{"type":"number"},"accountId":{"type":"number"}},"additionalProperties":false}}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Retrieves all PubNub applications that contain keysets assigned to a specific OEM customer.","summary":"List applications for customer"},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/customers/{customerId}/keysets":{"post":{"tags":["OEM Customer"],"operationId":"OEM Customer.addKeysets","parameters":[{"name":"customerId","in":"path","schema":{"type":"string","description":"The unique identifier of the customer"},"required":true,"description":"The unique identifier of the customer"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["id","externalId","name","created","updated","keysets"],"properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"created":{"$ref":"#/components/schemas/Date"},"updated":{"$ref":"#/components/schemas/Date"},"keysets":{"type":"array","items":{"type":"object","required":["id","assignedAt"],"properties":{"id":{"type":"number"},"assignedAt":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Assigns one or more keysets to an existing OEM customer. This establishes the relationship between your customer and specific PubNub resources they can access.","summary":"Assign keysets to customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["keysetIds"],"properties":{"keysetIds":{"type":"array","items":{"type":"number"},"description":"Array of keyset IDs to assign to the customer"}},"additionalProperties":false}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/oem/access-token":{"post":{"tags":["OEM Customer"],"operationId":"OEM Customer.issueCustomerAccessToken","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["accessToken"],"properties":{"accessToken":{"type":"string","description":"The generated JWT access token for the customer user"}},"additionalProperties":false}}}},"400":{"description":"Bad Request Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalErrorError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorError"}}}}},"description":"Issues a secure access token for an OEM customer user. The token grants access to specified permissions and can be configured with custom expiration times (in minutes, hours, or days). Account ID is derived from authorization.","summary":"Issue customer access token","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["permissions","externalId","customerUserId","appId"],"properties":{"permissions":{"type":"array","items":{"type":"string","enum":["business-object:read","business-object:write","business-object:update:activation","business-object:write:config","business-object:update:map","dashboard:read","dashboard:write","decision:read","decision:read:config","decision:read:rule","decision:write","decision:update:activation","decision:write:config","decision:update:rule","metric:read","metric:write"]},"description":"Array of permission strings that define what the customer user can access"},"expiresIn":{"type":"string","description":"Token expiration time in format: digits followed by m (minutes), h (hours), or d (days). Examples: 30m, 2h, 7d. Defaults to 1h if not provided","default":"1h","pattern":"^\\d+[mhd]$"},"externalId":{"type":"string","description":"The unique external identifier of the customer"},"customerUserId":{"type":"string","description":"The unique identifier for the customer user"},"appId":{"type":"number","description":"The application ID for which the token is being issued"}},"additionalProperties":false}}},"required":true}},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]},"/v2/usage-metrics":{"get":{"operationId":"getMetrics","parameters":[{"name":"entityType","required":true,"in":"query","description":"Type of entity to get metrics for","schema":{"enum":["account","app","keyset"],"type":"string"}},{"name":"entityId","required":true,"in":"query","description":"ID of the entity","schema":{"example":"372873","type":"string"}},{"name":"from","required":true,"in":"query","description":"Start date (inclusive) in YYYY-MM-DD format","schema":{"example":"2024-04-03","type":"string"}},{"name":"to","required":true,"in":"query","description":"End date (exclusive) in YYYY-MM-DD format","schema":{"example":"2024-04-05","type":"string"}},{"name":"metrics","required":true,"in":"query","description":"Comma-separated list of metric names to retrieve. Each metric name must be one of the valid values defined in the introduction section.","schema":{"example":"mtd_uuid,mtd_txn_total","type":"string"}}],"responses":{"200":{"description":"Successful metrics query","schema":{"example":{"publish":{"2024-04-03":1234,"2024-04-04":1567,"2024-04-05":2134},"subscribe_msgs":{"2024-04-03":5678,"2024-04-04":6234,"2024-04-05":7890},"history_msgs":{"2024-04-03":9012,"2024-04-04":8765,"2024-04-05":7321}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMetricsResponseDoc"}}}},"400":{"description":"Bad request - invalid parameters","content":{"application/json":{"schema":{"example":{"statusCode":400,"message":["Invalid metrics: invalid_metric_name"],"error":"Bad Request"}}}}}},"tags":["Usage"]},"parameters":[{"name":"PubNub-Version","in":"header","required":true,"x-pn-implicit":true,"schema":{"type":"string","enum":["2026-10-14"],"default":"2026-10-14"}}]}},"tags":[{"name":"Illuminate","description":"\n## Illuminate\n\nThe PubNub Illuminate REST API provides programmatic access to create, manage, and monitor your real-time analytics and decision-making infrastructure.\n\nUse this API to define the data you capture (business objects), transform that data into aggregations (metrics), make real-time decisions (decisions), and visualize everything (dashboards). The typical workflow is linear and repeatable across projects."},{"name":"Functions","description":"## Functions\n\nThis group of endpoints allows you to manage Functions in your PubNub account.\n\nFunctions let you execute custom logic in response to messages, events, or HTTP requests on the PubNub network. Code runs on managed infrastructure with automatic scaling, so you can add real-time features without maintaining your own servers.\n\n**Core Concepts:**\n- **Packages** — containers that group related functions together with shared configuration\n- **Revisions** — immutable, versioned snapshots of a package's functions and code\n- **Deployments** — running instances of a package revision on a keyset, deployed across PubNub's global infrastructure\n\n**Function Types:**\n- **Before Publish/Signal/File** — intercept and transform messages on a channel before delivery\n- **After Publish/Signal/File** — react to messages on a channel asynchronously after delivery\n- **On Presence** — react to user presence events (join, leave, timeout)\n- **On Interval** — execute on a schedule for background processing\n- **On Request** — expose custom HTTP endpoints accessible via the PubNub domain"},{"name":"Packages","description":"Manage packages containing function code and configuration."},{"name":"Revisions","description":"Manage package and function revisions containing versioned function code."},{"name":"Deployments","description":"Manage deployments of package revisions."},{"name":"Catalog","description":"Browse and import blueprints from the template catalog."},{"name":"KV Store","description":"Key-value storage operations (strings, JSON, counters) scoped to a keyset."},{"name":"Secrets Storage","description":"Encrypted secret key-value storage scoped to a keyset."},{"name":"Scheduled Events","description":"Manage scheduled deployment events."},{"name":"Configs","description":"Account configuration."},{"name":"Limits","description":"Query account resource limits"},{"name":"Functions Errors","description":"## Functions Errors\n\nAll error responses use the standard envelope format:\n\n```json\n{\n  \"meta\": { \"timestamp\": \"...\", \"correlationId\": \"...\" },\n  \"errors\": [{ \"code\": \"FAAS-1004\", \"message\": \"Package with ID [...] was not found!\" }]\n}\n```\n\nThe `code` field is a stable machine-readable identifier. The `message` field is a human-readable description that may include contextual details.\n\n| Code | HTTP Status | Description |\n|------|-------------|-------------|\n| `FAAS-400` | 400 | Validation or parameter error. |\n| `FAAS-403` | 403 | Forbidden — insufficient permissions. |\n| `FAAS-405` | 405 | HTTP method not allowed. |\n| `FAAS-406` | 406 | Requested media type not acceptable. |\n| `FAAS-409` | 409 | Unique constraint violation. |\n| `FAAS-415` | 415 | Unsupported media type. |\n| `FAAS-500` | 500 | Internal server error. |\n| `FAAS-1000` | 400 | Invalid correlation ID format. |\n| `FAAS-1001` | 401 | Authentication credentials not provided. |\n| `FAAS-1002` | 401 | Invalid authentication credential. |\n| `FAAS-1003` | 400 | Malformed JSON payload. |\n| `FAAS-1004` | 400 | Entity not found. |\n| `FAAS-1005` | 422 | Account package limit reached. |\n| `FAAS-1006` | 422 | Functions per package revision limit reached. |\n| `FAAS-1007` | 400 | Scheduled event has invalid date/time. |\n| `FAAS-1008` | 423 | Deployment cannot be started — transitional state. |\n| `FAAS-1009` | 423 | Deployment cannot be stopped — transitional state. |\n| `FAAS-1010` | 409 | Scheduled event cannot be deleted. |\n| `FAAS-1011` | 409 | **Deprecated.** Scheduled event cannot be updated. |\n| `FAAS-1012` | 500 | Deployment failed to start. |\n| `FAAS-1013` | 500 | Deployment failed to stop. |\n| `FAAS-1014` | 409 | Deployment cannot be deleted. |\n| `FAAS-1015` | 409 | Package revision already assigned to keyset. |\n| `FAAS-1016` | 409 | Package cannot be deleted — has active deployments. |\n| `FAAS-1017` | 409 | Package revision cannot be deleted — has active deployments. |\n| `FAAS-1018` | 400 | Malformed page token. |\n| `FAAS-1019` | 400 | Page size must be greater than zero. |\n| `FAAS-1020` | 400 | Subkey parameter is required. |\n| `FAAS-1021` | 400 | KV key not found. |\n| `FAAS-1022` | 400 | Subkey not found. |\n| `FAAS-1023` | 400 | Parameter validation failed. |\n| `FAAS-1024` | 500 | Secrets storage operation failed. |\n| `FAAS-1025` | 401 | **Deprecated.** Failed to validate session token due to network issue. |\n| `FAAS-1026` | 409 | Cannot delete the last test input from a function. |\n| `FAAS-1027` | 403 | User does not have required permissions. |\n| `FAAS-1028` | 422 | Package revision cannot be created — validation failed. |\n| `FAAS-1029` | 400 | Pagination not supported for this query. |\n| `FAAS-1030` | 409 | Keyset is disabled. |\n| `FAAS-1031` | 409 | Running deployment limit reached for account. |\n| `FAAS-1032` | 422 | Invalid stop parameters. |\n| `FAAS-1034` | 500 | Failed to enable functions on keyset. |\n| `FAAS-1035` | 422 | Rolling update requires same keyset. |\n| `FAAS-1036` | 422 | Code transpilation failed. |\n| `FAAS-1037` | 500 | Code transpilation service unavailable. |\n| `FAAS-1038` | 422 | Package revision validation failed. |\n| `FAAS-1039` | 409 | Package revision limit reached. |\n| `FAAS-1040` | 409 | Deployment limit per revision reached. |\n| `FAAS-1041` | 409 | Test input limit per function reached. |\n| `FAAS-1042` | 409 | Deployment has channel or path conflicts. |\n| `FAAS-1043` | 503 | **Deprecated.** Account not found for the specified Keyset. |\n| `FAAS-1044` | 400 | **Deprecated.** Ambiguous authentication — multiple auth methods provided. |\n| `FAAS-1045` | 500 | Service unavailable. |\n| `FAAS-1046` | 422 | Rolling update requires same package. |\n| `FAAS-1047` | 401 | Authentication method not supported on this endpoint. |\n| `FAAS-1049` | 422 | The PubNub-Version header is required for all public API endpoints. |\n| `FAAS-1050` | 422 | Function code length exceeds limit. |\n| `FAAS-1051` | 400 | PubNub-Version header has an invalid API version format. |\n| `FAAS-1052` | 409 | Database constraint or data integrity violation. |\n| `FAAS-1053` | 423 | Account is temporarily locked - write operations are rejected until the account returns to ACTIVE. |\n| `FAAS-1055` | 422 | Function code contains a character that cannot be stored. |\n| `FAAS-1056` | 422 | A submitted value is malformed or out of range. |\n"},{"name":"Insights","description":"Access aggregated metrics and actionable analytics built from your PubNub data and usage. Retrieve channel, user, and message metrics across configurable time ranges and entity scopes.\n\n**Note:** API access requires Insights Premium, available on the Starter plan and as an upgrade on the Pro plan."},{"name":"Apps","description":"\n## Apps\n\nThis group of endpoints allows you to manage apps in your PubNub account.\n\nApps are containers for keysets in your PubNub account. Each app can have multiple keysets for different environments (testing and production).\n    "},{"name":"Keysets","description":"\n## Keysets\n\nThis group of endpoints allows you to manage keysets within your PubNub account.\n\nKeysets are configuration units that enable developers to manage and control various features of their real-time communication applications.\n\n**Key Features:**\n- Authentication for SDK\n- Configurable features including Stream Controller, Presence, Access Manager, Message Persistence, App Context, Mobile Push Notifications, and File Sharing\n- Testing vs Production environment designation\n- Secret key rotation capabilities\n    "},{"name":"Config","description":"\n## Keyset Configuration\n\nThis group of endpoints allows you to retrieve and update feature configurations for keysets.\n\n**Feature Configuration Overview:**\n\nWhen you create a keyset, some features start with default options. You can configure various features to control the behavior and capabilities of your PubNub application:\n\nConfig consists of the following sections:\n- [Access Manager](https://www.pubnub.com/docs/general/security/access-control) - cryptographic, token-based permission administrator that allows you to regulate clients' access to PubNub resources, such as channels, channel groups, and User IDs.\n- [Stream Controller](https://www.pubnub.com/docs/general/channels/stream-controller) - as PubNub allows you to have hundreds or even thousands of subscriptions, it's vital to understand how to manage them efficiently.\n- [Presence](https://www.pubnub.com/docs/general/presence/overview) - gives you visibility into who is currently subscribed to a channel. In other words, it monitors the subscribers of channels and delivers information on their real-time status.\n- [Message Persistence](https://www.pubnub.com/docs/general/storage) - allows you to store all messages as they're published. The primary use case is to allow a device to retrieve messages that were published while that device was offline, but there are many other use cases as well.\n- [App Context](https://www.pubnub.com/docs/general/metadata/basics) - allows you to persist metadata about channels, channel memberships, channel members, and users.\n- DataSync - stores entity and relationship data and streams state changes as real-time events. Configure enablement and a write-once AWS region. Customer DataSync requests require Access Manager, which must be enabled separately.\n- [File Sharing](https://www.pubnub.com/docs/general/files) - allows users to upload and share files up to 5MB in size, for example in social apps to share images or in medical apps to share medical records.\n- [Mobile Push Notifications - APNS](https://www.pubnub.com/docs/general/push/ios) - allows you to send push notifications to Apple devices, after you upload the APNS token file.\n- [Mobile Push Notifications - FCM](https://www.pubnub.com/docs/general/push/android) - allows you to send push notifications to Android devices, after you upload the FCM token file.\nEach section has its own set of properties that can be updated.\nFor more information on each section, see the section below.\n    "},{"name":"Secret Keys","description":"\nThis group of endpoints allows you to manage and rotate secret keys. Use it especially if your secret key security has been compromised or for regular security rotation.\nYou will have exactly one, main, secret key with no expiry date and up to five time-limited keys.\n\nYou can either replace the main secret key or rotate with additional time-limited secret keys for gradual switch without downtime. If the migration takes longer than usual, you can update the expiration time, or delete the already unused secret key.\n\n **Note**: You must be on a paid plan to use secret key rotation with the overlap period.\n    "},{"name":"OEM Customer","description":"\n## Overview\n\nPubNub's OEM (Original Equipment Manufacturer) Customer API enables partners to manage their end customers and their access to PubNub resources. This API is designed for partners who want to embed, rebrand, and offer PubNub capabilities as part of their own products.\n\n## Key Concepts\n\n### Customers\nAn OEM customer represents one of your end-users or organizations. Each customer is identified by:\n- A unique internal customer ID assigned by PubNub\n- An `externalId` that you define (URL-safe identifier from your system)\n- A display name for organizational purposes\n\n### Keysets\nKeysets are PubNub's publish/subscribe key pairs. In the OEM model, you assign keysets to customers to grant them access to specific PubNub resources. Each customer can have multiple keysets assigned across different applications.\n\n## Typical Workflow\n\n1. **Create a customer** using the `POST /oem/customers` endpoint with your own `externalId`\n2. **Assign keysets** to the customer either during creation or later via `POST /oem/customers/:customerId/keysets`\n3. **Generate access tokens** for customer users to access embedded UI features (if using Illuminate or other embeddable interfaces)\n4. **Manage customer resources** by listing, updating, or filtering by application\n\n## Authorization\n\nAll endpoints in this group require partner-level authorizatoion. The authorized account must be added by Pubnub Team to OEM partner program. Please, contact Support to enroll.\n\nFor more information about PubNub OEM capabilities, visit: https://www.pubnub.com/docs/illuminate/embed-illuminate-ui\n    "},{"name":"Usage","description":"\n# Usage\nAPI for retrieving usage metrics.\n\n## Entity types\n\nMetrics can be queried based on different entity types:\n- account\n- application\n- keyset\n\nComing soon:\n- customer, if you use Partner module you can query metrics for customers associated with your account\n\n## Metrics\n\nUsage metrics include various data points such as API calls, data storage, and other resource utilizations.\nAll of them are aggregated on daily basis. Most metrics are available also with an hourly resolution.\nData hourly metrics is retained for 90 days. Data for daily metrics is retained for 12 months.\n\nData are usually available with 3-4 hours delay.\n\n**Note on Month-to-Date (MTD) Metrics**: Metrics with the `mtd_` prefix represent cumulative values for the entire month up to the queried date. These metrics accumulate from the first day of the month, so when querying MTD metrics, you typically want to use the last day of the month to get the complete monthly total. For example, `mtd_txn_total` and `mtd_uuid` show cumulative counts that grow throughout the month.\n\n### Transactions vs Messages\n\nSome metrics are available both as transaction counts and message counts. Transactions are API calls which may involve multiple messages. Bigger messages may be split between multiple transactions. For datails about transaction types see [Transaction Classification](https://www.pubnub.com/pricing/transaction-classification).\nPubNub pricing is based on transaction counts.\n\n### Transaction types\n\nYou can find the total number of transactions under the `txn_total` metric. To get the total number of transactions for a current month use the `mtd_txn` metric.\n\n| Metric Name | Description |\n|-------------|-------------|\n| txn_total | Number of total transactions. |\n| mtd_txn_total | Month-to-date transaction count |\n\nYou can group usage by transaction types using dedicated metrics.\n\n| Metric Name | Description |\n|-------------|-------------|\n| edge | All API Calls that interact with a single PubNub Point of Presence |\n| replicated | All API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message |\n| message_actions | All API Calls for Messages Actions that interact with a single PubNub Point of Presence |\n| signals | All API calls that involve sending (Publishes) or receiving (Subscribes) Signal messages. |\n| free | Number of transactions counted as Free |\n\n### Monthly Active Users (MAU)\n\nYou can find the number of MAUs under the `mtd_uuid` metric and the number of unique users *in a given day* can under the `uuid` metric.\n\nNote that `uuid` is not cumulative - it shows the number of unique users seen on that specific day, while `mtd_uuid` accumulates unique users from the start of the month up to that day.\n\n| Metric Name | Description |\n|-------------|-------------|\n| mtd_uuid | Number of Active users (UUIDs) at a given moment in time. |\n\n### All Available Metrics\n\n| Metric Name | Description |\n|-------------|-------------|\n| mtd_uuid | Number of Active users (UUIDs) at a given moment in time. |\n| txn_total | Number of total transactions. |\n| pn_uuid | Number of Active users (UUIDs) at a given moment in time. |\n| replicated | All API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message |\n| signals | All API calls that involve sending (Publishes) or receiving (Subscribes) Signal messages. |\n| edge | All API Calls that interact with a single PubNub Point of Presence |\n| message_actions | All API Calls for Messages Actions that interact with a single PubNub Point of Presence |\n| free | Number of transactions counted as Free |\n| accessmanager_audits_transactions | Access Manager Audit Transactions |\n| accessmanager_grants_v3_transactions | Access Manager v3 Grant Transactions |\n| accessmanager_grants_transactions | Access Manager v2 Grant Transactions |\n| accessmanager_replicated | Access Manager API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP)  |\n| accessmanager_edge | Access Manager API calls with client errors that interact with a single PubNub Point-of-Presence (PoP) |\n| misfire_client_transactions | Number of transactions as a result of calling a function, from the developer's client application, using the Fire endpoint, and having that API call not actually trigger the target function to be executed. |\n| kv_read_transactions | Number of transactions as a result of using the KV Store read API within a PubNub Function. The KV Store API allows for setting and getting of key value based data. |\n| kv_write_transactions | Number of transactions as a result of using the KV Store write API within a PubNub Function. The KV Store API allows for setting and getting of key value based data. |\n| misfire_eh_transactions | Number of transactions as a result of calling a function, from the developer's function code, using the Fire endpoint, and having that API call not actually trigger the target function to be executed. |\n| xhr_transactions | Number of transactions of result of using the XHR API from within a PubNub Function. This API allows for interaction with external HTTP/S resources from within a developer's Functions code. This API is not called directly from PubNub Client SDKs. NOTE: an execution of a Function can result in multiple XHR transactions, especially if retry logic is employed. |\n| functions_replicated | Function API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message |\n| functions_edge | Function API calls that interact with a single PubNub Point-of-Presence (PoP), such as receiving a published message via a Subscribe API call, such as function misfire or Key Value reads |\n| executions | The number of times a function was executed |\n| history_messages_count_transactions | Count of messages published |\n| history_transactions | Number of History transactions |\n| history_edge | History API calls with client errors that interact with a single PubNub Point-of-Presence (PoP) |\n| message_actions_add_transactions | Add Message reaction transactions |\n| message_actions_get_transactions | Retrieving Message Reactions transactions |\n| message_actions_remove_transactions | Removing Message Reactions transactions |\n| subscribe_message_actions_transactions | Subscribing to Message Reactions transactions |\n| objects_create_space_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of creating channels. |\n| objects_create_user_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of creating users. |\n| objects_delete_space_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of deleting channels. |\n| objects_delete_user_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of deleting users. |\n| objects_get_all_spaces_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of fetching all created channels. |\n| objects_get_all_users_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of fetching all created users. |\n| objects_get_space_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of fetching a specific channel. |\n| objects_get_user_space_memberships_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of fetching the user members of a specific channel. |\n| objects_get_space_user_memberships_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of fetching the channels of which a specific user is a member. |\n| objects_get_user_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of fetching a specific created user. |\n| objects_update_space_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of updating a specific channel. |\n| objects_update_space_user_memberships_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of updating a specific channel-to-user membership |\n| objects_update_user_space_memberships_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of updating a specific user-to-channel membership |\n| objects_update_user_transactions | Number of transactions as a result of using the App Context endpoint, with the purpose of updating a specific channel. |\n| internal_publish_objects_transactions | App Context Publish Transactions |\n| objects_replicated | App Context API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP) |\n| objects_edge | Object API calls that interact with a single PubNub Point-of-Presence (PoP) |\n| objects_users | All Object API Transactions related to Users |\n| objects_spaces | All Object API Transactions related to channels |\n| objects_memberships | All Object API Transactions related to Memberships |\n| objects_errors | Object API client error transactions and unauthorized transactions |\n| presence_getuserstate_transactions | Presence Get State Transactions |\n| presence_herenow_global_transactions | Presence HereNow (Global) Transactions |\n| presence_herenow_transactions | Presence HereNow Transactions |\n| presence_leave_transactions | Presence Leave (Unsubscribe) Transactions |\n| presence_setuserstate_transactions | Presence Set State Transactions |\n| presence_heartbeats_transactions | Presence Explicit Heartbeat Transactions |\n| presence_wherenow_transactions | Presence WhereNow Transactions |\n| presence_replicated | Presence API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP) |\n| presence_edge | Presence API calls that interact with a single PubNub Point-of-Presence (PoP) |\n| apns_sent_transactions | Push notifications sent to Apple Push Notification Service |\n| apns_removed_transactions | Number of transactions as a result of publishing a message with the proper data signifying removal of an Apple Push Notification Token. These transactions are not related to specific API calls but are a result of push-related publishes. |\n| gcm_removed_transactions | Number of transactions as a result of publishing a message with the proper data signifying removal of an FCM Push Notification Token. These transactions are not related to specific API calls but are a result of push-related publishes. |\n| gcm_sent_transactions | Push notifications sent to Apple Push Notification Service |\n| push_device_writes_transactions | Number of transactions as a result of using the Push Device Registration endpoint, which allows developers to add notification channels for a device. |\n| push_device_reads_transactions | Number of transactions as a result of using the Push List Channels For Device endpoint, which allows developers to list all channels on which push notification has been enabled using specified pushToken. |\n| push_notifications_replicated | Mobile Push Notification API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP) |\n| push_notifications_edge | Mobile Push Notifications API calls that interact with a single PubNub Point-of-Presence (PoP) |\n| push_notifications_apple | Transactions made to Apple Push Notification service |\n| push_notifications_android | Transactions made to Firebase Cloud Messaging service |\n| push_notifications_microsoft | Transactions made to Microsoft Push Notifications service |\n| steam_controller_edge | Sream Controller API calls that interact with a single PubNub Point-of-Presence (PoP) |\n| steam_controller_replicated | Stream Controller API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP) |\n| streamcontroller_reads_transactions | Number of transactions generated by calls to the Channel Group List Channels API, counted in 2K buckets |\n| streamcontroller_writes_transactions | Number of transactions generated by calls to the Channel Group Add/Remove Channels API, counted in 2K buckets |\n| bytes_stored | Total storage usage |\n| bytes_stored_blocks | Storage usage for blocks data |\n| bytes_stored_channel_groups | Storage usage for channel groups data |\n| bytes_stored_files | Storage usage for files data |\n| bytes_stored_messages | Storage usage for messages data |\n| bytes_stored_push | Storage usage for push notification data |\n| bytes_stored_size_auth | Storage usage for authorization data |\n| bytes_stored_users | Storage usage for user data |\n| bytes_stored_memberships | Storage usage for membership data |\n| events_ingested | Number of events ingested into the system |\n| history_with_actions_transactions | Number of transactions generated by calls to the Storage & Playback service, to fetch message actions, counted in 2K buckets |\n| mtd_txn_total | Month-to-date transaction count |\n| mtd_txn_mtd_uuid_ratio | Ratio of month-to-date transactions to month-to-date unique users |\n| signal_transactions | Number of transactions as a result of using the Signal endpoint, with the purpose of inputting message data, of a small size, into PubNub and having it delivered to subscribers to the given channel. |\n| subscribe_signal_transactions | Number of transactions as a result of using the Subscribe endpoint, with the purpose of establishing and maintaining a subscription connection to PubNub as well as retrieving any published signal data. This number is based on a combination of API requests and payload sizes. It is not a metric to use to determine how many messages have been delivered. |\n| subscribe_transactions | Transactions related to message subscriptions |\n| subscribe_timeouts_transactions | Timeouts of subscriber connection |\n| subscribe_objects_transactions | App Context related transactions triggered by Subscribers |\n| subscribe_heartbeats_transactions | Total number of API requests made in order to establish connection, or 'heartbeat', to the PubNub network. |\n| subscribe_streaming_transactions | Streaming Subscribe transactions |\n| subscribe_clientclosedconnection_transactions | Client disconect transactions (HTTP 499) |\n| subscribe_edge | API calls that interact with a single PubNub Point-of-Presence (PoP), such as receiving a published message via a Subscribe API call |\n| publish_transactions | Number of publish transactions API |\n| publish_edge | Number of client erros on Publish API that come from a single PubNub Point of Presence |\n| publish_replicated | API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), such as publishing a message |\n| files_publish_transactions | Number of transactions generated by operation to publish file messages on a channel |\n| files_delete_file_transactions | Number of transactions generated by the delete file operation to delete a file |\n| files_generate_url_transactions | Number of transactions generated by the operation to generate pre-signed urls for file upload |\n| files_get_file_transactions | Number of transactions generated by the get file operation to download file data |\n| subscribe_files_transactions | Number of transactions generated by the get file operation to download file data |\n| files_get_all_files_transactions | Number of transactions generated by the list files operation to list files stored for a channel |\n| files_replicated | File Sharing API calls that result in information replicating across multiple PubNub Points-of-Presence (PoP), publish transactions. |\n| files_edge | File Sharing API Calls that interact with a single PubNub Point of Presence |\n| files_storage | Total file storage usage |\n| files_transfer | File transfer — egress only (file downloads) |\n| publish_bytes | The total number of message bytes published, as measured by total request length, for the time period. |\n| subscribe_bytes | The total number of message bytes received by subscribers, as measured by total request length, for the time period. |\n| publish_msg_average_size | The average size of the published messages for the time period. |\n| message_ratio | Average subscriber deliveries per published message across all channels.\n< 1: Mostly direct messaging or messages with few/no subscribers.\n>≥ 1: Mostly group messaging or broadcast channels. |\n| files_clienterrors_transactions | Number of File Sharing API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| publish_clienterrors_transactions | Number of Publish API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| subscribe_clienterrors_transactions | Number of Subscribe API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| signal_clienterrors_transactions | Number of Signal API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| streamcontroller_clienterrors_transactions | Number of Stream Controller API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| push_device_clienterrors_transactions | Number of Mobile Push Notifications API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| presence_clienterrors_transactions | Number of Presence API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| objects_clienterrors_transactions | Number of App Context API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| message_actions_clienterrors_transactions | Number of Message Reactions API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| history_with_actions_clienterrors_transactions | Number of History with Message Reactions API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| history_clienterrors_transactions | Number of History API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| accessmanager_clienterrors_transactions | Number of Access Manager API transactions resulted in other than HTTP 200 response code. Incorrect usage is generally a result of the wrong parameters and values being used in application code and execution. |\n| history_with_actions_unauthorized_transactions | The number of transactions generated by calls to the Storage & Playback service, to fetch Message Reactions, that resulted in a 403 Forbidden error, counted in 2K buckets. |\n| message_actions_unauthorized_transactions | The number of transactions generated by the Message Reactions API calls that resulted in a 403 Forbidden error, counted in 2K buckets. |\n| objects_unauthorized_transactions | Number of transactions as a result of attempted unauthorized usage of the App Context endpoints. |\n| signal_unauthorized_transactions | Number of transactions as a result of attempted unauthorized usage of the Signal endpoint. |\n| subscribe_unauthorized_transactions | Number of transactions as a result of attempted unauthorized usage of the Subscribe endpoint. |\n| publish_unauthorized_transactions | Number of transactions as a result of attempted unauthorized usage of the Publish endpoint. |\n| files_unauthorized_transactions | Number of transactions as a result of attempted unauthorized usage of the files endpoints |\n| msgs_total | Total messages sent and received through the use of all PubNub APIs |\n| publish | Total number of messages published |\n| subscribe_msgs | Total number of messages delivered to subscribers |\n| history_msgs | The number of messages retrieved from storage, in total, within the time period. |\n| pres_pub | Total number of messages published from Presence API |\n| channel | The maximum number of unique active channels in time period. Activity is measured by any API requests involving a channel, whether subscribing or publishing to, fetching message history for, setting and getting presence associated data, among some other channel related API endpoints. |\n| ip | The maximum number of unique active devices, based on IP address, in the time period. Activity is measured by Publish/Subscribe/History/Presence API requests within the time period. |\n| key_ip_ch | The maximum number of unique active devices, based on IP address, in any channel in time period. Activity is measured by Subscribe API requests for any and all channels and the uniqueness check is within the channel, within the time period. For example, if within a day, Channels A, B, and C have respectively maximum number of unique users/devices/uuids 100,1000,1001, the Active Unique Devices by Channel for the day would be 1001. |\n| key_ip_ua | The maximum number of unique active devices, based on User Agent, in the time period. Activity is measured by Publish/Subscribe/History/Presence API requests within the time period. |\n| uuid | The maximum number of UUIDs, or Users, based on uuid specified in SDK or API, observed during the time period. |\n| fire_transactions | The number of transactions generated by calls to the Fire API resource, counted in 2K buckets |\n| fire_eh_transactions | Number of transactions as a result of using the Fire endpoint, which allows the developer to send a message to PubNub Functions. This API call is made from a developer's PubNub Function code and results in the message data being passed to another PubNub Function. |\n| fire_client_transactions | Number of transactions as a result of using the Fire endpoint, which allows the developer to send a message to PubNub Functions. This API call is made from the developer's client application, with the message data sent to the PubNub network and subsequently passed to a PubNub Function. |\n"}]}