{ "openapi": "3.1.1", "info": { "version": "1.0.0", "title": "AWorld API - App Endpoints", "description": "The App context provides APIs for integrating with and extending applications built on the AWorld platform. These APIs are designed for use in end-user applications and client-side interfaces." }, "servers": [], "paths": { "/activity-logs": { "post": { "operationId": "activityLogs/create", "summary": "Create activity log", "description": "Creates a new activity log entry for a user. \n This endpoint is intended for backend systems to record custom user activities defined through the Dashboard. \n Built-in activities such as quizzes, stories, and other internal events are automatically tracked and should not be manually created through this endpoint.", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "userId": { "type": "string" }, "outcome": { "type": "string", "enum": [ "SUCCESS", "FAILURE" ] }, "value": { "type": "number", "default": 1 }, "tags": { "type": "array", "items": { "type": "string" } }, "additionalData": { "type": "object", "additionalProperties": {} }, "activityLogId": { "type": "string" }, "completedAt": { "type": "string", "format": "date-time" } }, "required": [ "activityId", "userId" ] } } } }, "responses": { "201": { "description": "Activity created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "409": { "description": "Activity Log ID already exists" } }, "tags": [ "ActivityLogs" ] } }, "/missions": { "get": { "operationId": "missions/list", "summary": "List missions", "description": "Retrieves a list of available missions for the authenticated user. \n Missions are tasks or challenges that users can complete to earn rewards.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Missions retrieved successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ListMissionsResponse" }, { "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "missionId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "missionRuleId": { "type": "string" }, "periodId": { "type": "string", "minLength": 1 }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "startsAt": { "type": "string", "format": "date-time" }, "endsAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "isCompleted": { "type": "boolean" }, "state": { "type": "string", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "incrementExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "targetAmountExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "currentAmount": { "type": "number" }, "targetAmount": { "type": "number" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "missionId", "missionType", "missionConfigurationId", "periodId", "timeframeType", "startsAt", "state", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "currentAmount", "targetAmount", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } } ] } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Missions" ] } }, "/quizzes": { "get": { "operationId": "quizzes/list", "summary": "List quizzes", "description": "Retrieves a list of available quizzes for the authenticated user. \n Quizzes are educational content that users can complete to test their knowledge.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Quizzes retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListQuizzesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Quizzes" ] } }, "/quizzes/{quizId}": { "get": { "operationId": "quizzes/get", "summary": "Get quiz by ID", "description": "Retrieves a specific quiz by its ID. \n Includes quiz questions, options, and associated metadata.", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translation" ] } } }, { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Quiz retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQuizResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes" ] } }, "/quizzes/{quizId}/submit": { "post": { "operationId": "quizzes/submit", "summary": "Submit quiz answers", "description": "Submits answers for a specific quiz. \n This endpoint processes the user's responses and returns the results.", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "answer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "context": { "type": "string", "default": "default", "minLength": 1 } }, "required": [ "answer" ] } } } }, "responses": { "200": { "description": "Quiz submitted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitQuizResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes" ] } }, "/quizzes/{quizId}/tags": { "get": { "operationId": "quizzes/listTags", "summary": "List quiz tags", "description": "Retrieves a list of tags assigned to a specific quiz. \n TagAssignments are used to categorize and organize quizzes.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Quiz tags retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListQuizTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes/Tags" ] } }, "/quizzes/{quizId}/tags/{tagId}": { "get": { "operationId": "quizzes/getTag", "summary": "Get quiz tag by ID", "description": "Retrieves a specific tag assignment for a quiz by tag ID.", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Quiz tag retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQuizTagResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or tag not found" } }, "tags": [ "Quizzes/Tags" ] } }, "/quizzes/{quizId}/translation": { "get": { "operationId": "quizzes/getTranslation", "summary": "Get quiz translation", "description": "Retrieves the translation for a specific quiz in the user's preferred language.", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Quiz translation retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQuizTranslationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or translation not found" } }, "tags": [ "Quizzes/Translation" ] } }, "/stories": { "get": { "operationId": "stories/list", "summary": "List stories", "description": "Retrieves a list of available stories for the authenticated user. \n Stories are educational content that users can read and engage with.", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translation", "quizzes" ] } } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Stories retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStoriesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Stories" ] } }, "/stories/{storyId}": { "get": { "operationId": "stories/get", "summary": "Get story by ID", "description": "Retrieves a specific story by its ID. \n Includes story content, metadata, and associated information.", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translations", "quizzes" ] } } }, { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Story retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStoryResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories" ] } }, "/stories/{storyId}/submit": { "post": { "operationId": "stories/submit", "summary": "Submit story completion", "description": "Marks a story as completed by the user. \n This endpoint tracks user engagement with story content.", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "START_READ", "COMPLETE_READ", "BOOKMARK", "UNBOOKMARK", "SHARE" ] }, "context": { "type": "string", "default": "default", "minLength": 1 }, "contentId": { "type": "integer", "minimum": 0 } }, "required": [ "action" ] } } } }, "responses": { "200": { "description": "Story submitted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitStoryResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories" ] } }, "/stories/{storyId}/tags": { "get": { "operationId": "stories/listTags", "summary": "List story tags", "description": "Retrieves a list of tags assigned to a specific story. \n TagAssignments are used to categorize and organize stories.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Story tags retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStoryTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories/TagAssignments" ] } }, "/stories/{storyId}/tags/{tagId}": { "get": { "operationId": "stories/getTag", "summary": "Get story tag by ID", "description": "Retrieves a specific tag assignment for a story by tag ID.", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Story tag retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStoryTagResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or tag not found" } }, "tags": [ "Stories/TagAssignments" ] } }, "/stories/{storyId}/translation": { "get": { "operationId": "stories/translation/get", "summary": "Get story translation", "description": "Retrieves the translation for a specific story in the user's preferred language.", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Story translation retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStoryTranslationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or translation not found" } }, "tags": [ "Stories/Translation" ] } }, "/streaks": { "get": { "operationId": "streaks/list", "summary": "List streaks", "description": "Retrieves a list of streaks for the authenticated user. \n Streaks track consecutive user activities and achievements over time.", "parameters": [ { "name": "from", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" } }, { "name": "goalId", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0 } }, { "name": "iterationId", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0 } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "periodType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "DAY", "WEEK", "MONTH", "YEAR", "ITERATION", "GOAL" ] } }, { "name": "streakRuleId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "target", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0 } }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Streaks retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStreaksResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Streaks" ] } }, "/users/me": { "get": { "operationId": "users/getMe", "summary": "Get current user", "description": "Retrieves information about the currently authenticated user. \n Includes user profile data, settings, and associated metadata.", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "principal" ] } } } ], "responses": { "200": { "description": "User retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCurrentUserResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Users" ] } }, "/users/me/principal": { "get": { "operationId": "users/me/principal/get", "summary": "Get current user principal", "description": "Retrieves the principal information for the currently authenticated user. \n Principal contains the user's identity details.", "responses": { "200": { "description": "User principal retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCurrentUserPrincipalResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Users" ] } }, "/users/me/tags": { "get": { "operationId": "users/me/tags/list", "summary": "List current user tags", "description": "Retrieves a list of tags assigned to the current user. \n TagAssignments are used to categorize users and provide personalized experiences.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "User tags retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCurrentUserTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Users/Tags" ] } }, "/users/me/tags/{tagId}": { "get": { "operationId": "users/me/tags/get", "summary": "Get current user tag by ID", "description": "Retrieves a specific tag assigned to the current user by tag ID.", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "User tag retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCurrentUserTagResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag not found" } }, "tags": [ "Users/Tags" ] } }, "/virtual-balances": { "get": { "operationId": "virtualBalances/list", "summary": "List virtual balances", "description": "Retrieves a list of virtual currency balances for the authenticated user. \n Virtual balances track the amount of each virtual currency the user owns.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Virtual balances retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListVirtualBalancesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "VirtualBalances" ] } }, "/virtual-balances/{virtualCurrencyId}": { "get": { "operationId": "virtualBalances/get", "summary": "Get virtual balance by currency ID", "description": "Retrieves the virtual balance for a specific virtual currency. \n Shows the current amount of the specified virtual currency owned by the user.", "parameters": [ { "name": "virtualCurrencyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Virtual balance retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetVirtualBalanceResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Virtual currency or balance not found" } }, "tags": [ "VirtualBalances" ] } }, "/virtual-transactions": { "get": { "operationId": "virtualTransactions/list", "summary": "List virtual transactions", "description": "Retrieves a list of virtual currency transactions for the authenticated user. \n Virtual transactions track credits, debits, and other changes to virtual currency balances.", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Virtual transactions retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListVirtualTransactionsResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "VirtualTransactions" ] }, "post": { "operationId": "virtualTransactions/create", "summary": "Create virtual transaction", "description": "Creates a new virtual currency transaction. \n This endpoint allows users to initiate transactions such as purchases or transfers using virtual currency.", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number", "exclusiveMinimum": 0 }, "expiresAt": { "type": "string", "format": "date-time" }, "destinationUserId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" } }, "required": [ "virtualCurrencyId", "redemptionMode", "amount", "destinationUserId" ] }, "maxItems": 20, "minItems": 1 } }, "required": [ "transactions" ] } } } }, "responses": { "201": { "description": "Virtual transaction created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVirtualTransactionResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "409": { "description": "Virtual Transaction ID already exists" } }, "tags": [ "VirtualTransactions" ] } }, "/virtual-transactions/{virtualTransactionId}": { "get": { "operationId": "virtualTransactions/get", "summary": "Get virtual transaction by ID", "description": "Retrieves a specific virtual transaction by its ID. \n Shows detailed information about the transaction including amount, currency, and status.", "parameters": [ { "name": "virtualTransactionId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Virtual transaction retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetVirtualTransactionResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Virtual transaction not found" } }, "tags": [ "VirtualTransactions" ] } }, "/virtual-transactions/{virtualTransactionId}/redeem": { "post": { "operationId": "virtualTransactions/redeem", "summary": "Redeem virtual transaction", "description": "Redeems a virtual transaction, typically converting virtual currency to real-world benefits or rewards. \n This endpoint finalizes the redemption process for eligible transactions.", "parameters": [ { "name": "virtualTransactionId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Virtual transaction redeemed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RedeemVirtualTransactionResponse" } } } }, "400": { "description": "Invalid transaction or cannot be redeemed" }, "401": { "description": "Unauthorized" }, "404": { "description": "Virtual transaction not found" } }, "tags": [ "VirtualTransactions" ] } } }, "components": { "parameters": {}, "schemas": { "CreateActivityResponse": { "type": "object", "properties": { "activityLogId": { "type": "string" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "userId": { "type": "string" }, "outcome": { "type": "string", "enum": [ "SUCCESS", "FAILURE" ] }, "value": { "type": "number", "default": 1 }, "tags": { "type": "array", "items": { "type": "string" } }, "additionalData": { "type": "object", "additionalProperties": {} }, "completedAt": { "type": "string", "format": "date-time" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "activityLogId", "activityId", "userId", "completedAt", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateVirtualTransactionResponse": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "virtualTransactionId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" }, "redemptionGroupId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "state": { "type": "string", "enum": [ "PENDING", "COMPLETED", "EXPIRED", "REJECTED" ] }, "direction": { "type": "string", "enum": [ "CREDIT", "DEBIT" ] }, "initiatorType": { "type": "string", "enum": [ "USER", "REWARD_RULE", "SYSTEM", "ADMIN" ] }, "initiator": { "type": "string", "minLength": 1 }, "counterpartType": { "type": "string", "enum": [ "USER", "SYSTEM" ] }, "counterpart": { "type": "string", "minLength": 1 }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number" }, "expiresAt": { "type": "string", "format": "date-time" }, "redeemedAt": { "type": "string" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "virtualTransactionId", "virtualTransactionGroupId", "redemptionMode", "state", "direction", "initiatorType", "initiator", "counterpartType", "counterpart", "amount", "createdAt", "updatedAt" ] } } }, "required": [ "transactions" ] }, "GetCurrentUserPrincipalResponse": { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" } }, "required": [ "principalId", "sub", "email" ] }, "GetCurrentUserResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "principalId": { "type": "string" }, "externalId": { "type": "string", "minLength": 1 }, "nickname": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^(?!.*[_.\\- ]{2,})[\\p{L}\\p{M}\\p{N}\\p{S}_ .-]{2,30}$/u" }, "profileImage": { "type": "string", "format": "uri" }, "lang": { "allOf": [ { "$ref": "#/components/schemas/Lang" }, { "default": "en" } ] }, "timezone": { "$ref": "#/components/schemas/Timezone" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "principal": { "anyOf": [ { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "principalId", "sub", "email", "firstName", "lastName", "createdAt", "updatedAt" ] }, { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" } }, "required": [ "principalId", "sub", "email" ] } ] } }, "required": [ "userId", "principalId", "accountId", "workspaceId", "createdAt", "updatedAt" ] }, "GetCurrentUserTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] }, "GetQuizResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translation": { "type": "object", "properties": { "quizId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "lang", "opt1", "opt2", "opt3", "opt4", "question", "createdAt", "updatedAt" ] } }, "required": [ "quizId", "difficulty", "origin", "placement", "defaultLang", "langs" ] }, "GetQuizTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "quizId" ] }, "GetQuizTranslationResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetStoryResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translation": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "storyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "storyId", "lang", "title", "image", "slides", "accountId", "sourceRegion", "createdAt", "updatedAt" ] }, "quizzes": { "type": "array", "items": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "storyId", "origin", "defaultLang", "langs" ] }, "GetStoryTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] }, "GetStoryTranslationResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "storyId", "lang", "title", "image", "slides", "createdAt", "updatedAt" ] }, "GetVirtualBalanceResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "amount": { "type": "number" }, "availableAmount": { "type": "number" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "amount", "availableAmount", "createdAt", "updatedAt" ] }, "GetVirtualTransactionResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "virtualTransactionId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" }, "redemptionGroupId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "state": { "type": "string", "enum": [ "PENDING", "COMPLETED", "EXPIRED", "REJECTED" ] }, "direction": { "type": "string", "enum": [ "CREDIT", "DEBIT" ] }, "initiatorType": { "type": "string", "enum": [ "USER", "REWARD_RULE", "SYSTEM", "ADMIN" ] }, "initiator": { "type": "string", "minLength": 1 }, "counterpartType": { "type": "string", "enum": [ "USER", "SYSTEM" ] }, "counterpart": { "type": "string", "minLength": 1 }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number" }, "expiresAt": { "type": "string", "format": "date-time" }, "redeemedAt": { "type": "string" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "virtualTransactionId", "virtualTransactionGroupId", "redemptionMode", "state", "direction", "initiatorType", "initiator", "counterpartType", "counterpart", "amount", "createdAt", "updatedAt" ] }, "JsonLogicExpression": { "description": "A JSON Logic expression used to define conditional rules in a declarative way.\n\nJSON Logic is a lightweight way to express rules, conditions, and decision trees in JSON format.\nThis schema only validates that the input is valid JSON; it does not validate the correctness of\nthe JSON Logic operators or semantics.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "Lang": { "description": "Supported Locale", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "ListCurrentUserTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMissionsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "missionId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "missionRuleId": { "type": "string" }, "periodId": { "type": "string", "minLength": 1 }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "startsAt": { "type": "string", "format": "date-time" }, "endsAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "isCompleted": { "type": "boolean" }, "state": { "type": "string", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "$ref": "#/components/schemas/JsonLogicExpression" }, "incrementExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "targetAmountExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "currentAmount": { "type": "number" }, "targetAmount": { "type": "number" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "missionId", "missionType", "missionConfigurationId", "periodId", "timeframeType", "startsAt", "state", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "currentAmount", "targetAmount", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListQuizTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListQuizzesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translation": { "type": "object", "properties": { "quizId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "lang", "opt1", "opt2", "opt3", "opt4", "question", "createdAt", "updatedAt" ] } }, "required": [ "quizId", "difficulty", "origin", "placement", "defaultLang", "langs", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStoriesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translation": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "storyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "storyId", "lang", "title", "image", "slides", "accountId", "sourceRegion", "createdAt", "updatedAt" ] }, "quizzes": { "type": "array", "items": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "storyId", "origin", "defaultLang", "langs", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStoryTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStreaksResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "streakRuleId": { "type": "string" }, "periodId": { "type": "string", "minLength": 1 }, "status": { "type": "string", "enum": [ "ACTIVE", "COMPLETED", "BROKEN", "ENDED" ] }, "kind": { "type": "string", "enum": [ "REGULAR", "FREEZE", "ANY" ] }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "metric": { "type": "string", "enum": [ "DAYS", "WEEKS" ] }, "count": { "type": "integer", "minimum": 0 }, "periodType": { "type": "string", "enum": [ "DAY", "WEEK", "MONTH", "YEAR", "ITERATION", "GOAL" ] }, "iterationId": { "type": "integer", "exclusiveMinimum": 0 }, "goalId": { "type": "integer", "exclusiveMinimum": 0 }, "target": { "type": "integer", "exclusiveMinimum": 0 }, "perfectWeek": { "type": "boolean" }, "perfectMonth": { "type": "boolean" }, "perfectYear": { "type": "boolean" }, "lastContributingDay": { "type": "string" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "streakRuleId", "status", "kind", "cadence", "metric", "count", "periodType", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListVirtualBalancesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "amount": { "type": "number" }, "availableAmount": { "type": "number" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "amount", "availableAmount", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListVirtualTransactionsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "virtualTransactionId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" }, "redemptionGroupId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "state": { "type": "string", "enum": [ "PENDING", "COMPLETED", "EXPIRED", "REJECTED" ] }, "direction": { "type": "string", "enum": [ "CREDIT", "DEBIT" ] }, "initiatorType": { "type": "string", "enum": [ "USER", "REWARD_RULE", "SYSTEM", "ADMIN" ] }, "initiator": { "type": "string", "minLength": 1 }, "counterpartType": { "type": "string", "enum": [ "USER", "SYSTEM" ] }, "counterpart": { "type": "string", "minLength": 1 }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number" }, "expiresAt": { "type": "string", "format": "date-time" }, "redeemedAt": { "type": "string" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "virtualTransactionId", "virtualTransactionGroupId", "redemptionMode", "state", "direction", "initiatorType", "initiator", "counterpartType", "counterpart", "amount", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "RedeemVirtualTransactionResponse": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "virtualTransactionId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" }, "redemptionGroupId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "state": { "type": "string", "enum": [ "PENDING", "COMPLETED", "EXPIRED", "REJECTED" ] }, "direction": { "type": "string", "enum": [ "CREDIT", "DEBIT" ] }, "initiatorType": { "type": "string", "enum": [ "USER", "REWARD_RULE", "SYSTEM", "ADMIN" ] }, "initiator": { "type": "string", "minLength": 1 }, "counterpartType": { "type": "string", "enum": [ "USER", "SYSTEM" ] }, "counterpart": { "type": "string", "minLength": 1 }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number" }, "expiresAt": { "type": "string", "format": "date-time" }, "redeemedAt": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "virtualTransactionId", "virtualTransactionGroupId", "redemptionMode", "state", "direction", "initiatorType", "initiator", "counterpartType", "counterpart", "amount", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "transactions" ] }, "SourceRegion": { "description": "Geographic Region where the entry was originally generated", "type": "string", "enum": [ "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ca-central-1", "ca-west-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-south-1", "eu-south-2", "eu-north-1", "me-central-1", "me-south-1", "sa-east-1" ] }, "SubmitQuizResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "userId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "answer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "lang": { "$ref": "#/components/schemas/Lang" }, "outcome": { "type": "string", "enum": [ "SUCCESS", "FAIL" ] }, "context": { "type": "string", "default": "default", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "userId", "difficulty", "answer", "lang", "outcome", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "SubmitStoryResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "userId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "action": { "type": "string", "enum": [ "START_READ", "COMPLETE_READ", "BOOKMARK", "UNBOOKMARK", "SHARE" ] }, "context": { "type": "string", "default": "default", "minLength": 1 }, "contentId": { "type": "integer", "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "storyId", "userId", "lang", "action", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "Timezone": { "description": "Supported timezones", "type": "string", "default": "UTC", "enum": [ "Europe/Andorra", "Asia/Dubai", "Asia/Kabul", "America/Antigua", "America/Anguilla", "Europe/Tirane", "Asia/Yerevan", "Africa/Luanda", "Antarctica/McMurdo", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Mawson", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "America/Argentina/Buenos_Aires", "America/Argentina/Cordoba", "America/Argentina/Salta", "America/Argentina/Jujuy", "America/Argentina/Tucuman", "America/Argentina/Catamarca", "America/Argentina/La_Rioja", "America/Argentina/San_Juan", "America/Argentina/Mendoza", "America/Argentina/San_Luis", "America/Argentina/Rio_Gallegos", "America/Argentina/Ushuaia", "Pacific/Pago_Pago", "Europe/Vienna", "Australia/Lord_Howe", "Antarctica/Macquarie", "Australia/Hobart", "Australia/Melbourne", "Australia/Sydney", "Australia/Broken_Hill", "Australia/Brisbane", "Australia/Lindeman", "Australia/Adelaide", "Australia/Darwin", "Australia/Perth", "Australia/Eucla", "America/Aruba", "Europe/Mariehamn", "Asia/Baku", "Europe/Sarajevo", "America/Barbados", "Asia/Dhaka", "Europe/Brussels", "Africa/Ouagadougou", "Europe/Sofia", "Asia/Bahrain", "Africa/Bujumbura", "Africa/Porto-Novo", "America/St_Barthelemy", "Atlantic/Bermuda", "Asia/Brunei", "America/La_Paz", "America/Kralendijk", "America/Noronha", "America/Belem", "America/Fortaleza", "America/Recife", "America/Araguaina", "America/Maceio", "America/Bahia", "America/Sao_Paulo", "America/Campo_Grande", "America/Cuiaba", "America/Santarem", "America/Porto_Velho", "America/Boa_Vista", "America/Manaus", "America/Eirunepe", "America/Rio_Branco", "America/Nassau", "Asia/Thimphu", "Africa/Gaborone", "Europe/Minsk", "America/Belize", "America/St_Johns", "America/Halifax", "America/Glace_Bay", "America/Moncton", "America/Goose_Bay", "America/Blanc-Sablon", "America/Toronto", "America/Iqaluit", "America/Atikokan", "America/Winnipeg", "America/Resolute", "America/Rankin_Inlet", "America/Regina", "America/Swift_Current", "America/Edmonton", "America/Cambridge_Bay", "America/Inuvik", "America/Creston", "America/Dawson_Creek", "America/Fort_Nelson", "America/Whitehorse", "America/Dawson", "America/Vancouver", "Indian/Cocos", "Africa/Kinshasa", "Africa/Lubumbashi", "Africa/Bangui", "Africa/Brazzaville", "Europe/Zurich", "Africa/Abidjan", "Pacific/Rarotonga", "America/Santiago", "America/Punta_Arenas", "Pacific/Easter", "Africa/Douala", "Asia/Shanghai", "Asia/Urumqi", "America/Bogota", "America/Costa_Rica", "America/Havana", "Atlantic/Cape_Verde", "America/Curacao", "Indian/Christmas", "Asia/Nicosia", "Asia/Famagusta", "Europe/Prague", "Europe/Berlin", "Europe/Busingen", "Africa/Djibouti", "Europe/Copenhagen", "America/Dominica", "America/Santo_Domingo", "Africa/Algiers", "America/Guayaquil", "Pacific/Galapagos", "Europe/Tallinn", "Africa/Cairo", "Africa/El_Aaiun", "Africa/Asmara", "Europe/Madrid", "Africa/Ceuta", "Atlantic/Canary", "Africa/Addis_Ababa", "Europe/Helsinki", "Pacific/Fiji", "Atlantic/Stanley", "Pacific/Chuuk", "Pacific/Pohnpei", "Pacific/Kosrae", "Atlantic/Faroe", "Europe/Paris", "Africa/Libreville", "Europe/London", "America/Grenada", "Asia/Tbilisi", "America/Cayenne", "Europe/Guernsey", "Africa/Accra", "Europe/Gibraltar", "America/Nuuk", "America/Danmarkshavn", "America/Scoresbysund", "America/Thule", "Africa/Banjul", "Africa/Conakry", "America/Guadeloupe", "Africa/Malabo", "Europe/Athens", "Atlantic/South_Georgia", "America/Guatemala", "Pacific/Guam", "Africa/Bissau", "America/Guyana", "Asia/Hong_Kong", "America/Tegucigalpa", "Europe/Zagreb", "America/Port-au-Prince", "Europe/Budapest", "Asia/Jakarta", "Asia/Pontianak", "Asia/Makassar", "Asia/Jayapura", "Europe/Dublin", "Asia/Jerusalem", "Europe/Isle_of_Man", "Asia/Kolkata", "Indian/Chagos", "Asia/Baghdad", "Asia/Tehran", "Atlantic/Reykjavik", "Europe/Rome", "Europe/Jersey", "America/Jamaica", "Asia/Amman", "Asia/Tokyo", "Africa/Nairobi", "Asia/Bishkek", "Asia/Phnom_Penh", "Pacific/Tarawa", "Pacific/Kanton", "Pacific/Kiritimati", "Indian/Comoro", "America/St_Kitts", "Asia/Pyongyang", "Asia/Seoul", "Asia/Kuwait", "America/Cayman", "Asia/Almaty", "Asia/Qyzylorda", "Asia/Qostanay", "Asia/Aqtobe", "Asia/Aqtau", "Asia/Atyrau", "Asia/Oral", "Asia/Vientiane", "Asia/Beirut", "America/St_Lucia", "Europe/Vaduz", "Asia/Colombo", "Africa/Monrovia", "Africa/Maseru", "Europe/Vilnius", "Europe/Luxembourg", "Europe/Riga", "Africa/Tripoli", "Africa/Casablanca", "Europe/Monaco", "Europe/Chisinau", "Europe/Podgorica", "America/Marigot", "Indian/Antananarivo", "Pacific/Majuro", "Pacific/Kwajalein", "Europe/Skopje", "Africa/Bamako", "Asia/Yangon", "Asia/Ulaanbaatar", "Asia/Hovd", "Asia/Macau", "Pacific/Saipan", "America/Martinique", "Africa/Nouakchott", "America/Montserrat", "Europe/Malta", "Indian/Mauritius", "Indian/Maldives", "Africa/Blantyre", "America/Mexico_City", "America/Cancun", "America/Merida", "America/Monterrey", "America/Matamoros", "America/Chihuahua", "America/Ciudad_Juarez", "America/Ojinaga", "America/Mazatlan", "America/Bahia_Banderas", "America/Hermosillo", "America/Tijuana", "Asia/Kuala_Lumpur", "Asia/Kuching", "Africa/Maputo", "Africa/Windhoek", "Pacific/Noumea", "Africa/Niamey", "Pacific/Norfolk", "Africa/Lagos", "America/Managua", "Europe/Amsterdam", "Europe/Oslo", "Asia/Kathmandu", "Pacific/Nauru", "Pacific/Niue", "Pacific/Auckland", "Pacific/Chatham", "Asia/Muscat", "America/Panama", "America/Lima", "Pacific/Tahiti", "Pacific/Marquesas", "Pacific/Gambier", "Pacific/Port_Moresby", "Pacific/Bougainville", "Asia/Manila", "Asia/Karachi", "Europe/Warsaw", "America/Miquelon", "Pacific/Pitcairn", "America/Puerto_Rico", "Asia/Gaza", "Asia/Hebron", "Europe/Lisbon", "Atlantic/Madeira", "Atlantic/Azores", "Pacific/Palau", "America/Asuncion", "Asia/Qatar", "Indian/Reunion", "Europe/Bucharest", "Europe/Belgrade", "Europe/Kaliningrad", "Europe/Moscow", "Europe/Simferopol", "Europe/Kirov", "Europe/Volgograd", "Europe/Astrakhan", "Europe/Saratov", "Europe/Ulyanovsk", "Europe/Samara", "Asia/Yekaterinburg", "Asia/Omsk", "Asia/Novosibirsk", "Asia/Barnaul", "Asia/Tomsk", "Asia/Novokuznetsk", "Asia/Krasnoyarsk", "Asia/Irkutsk", "Asia/Chita", "Asia/Yakutsk", "Asia/Khandyga", "Asia/Vladivostok", "Asia/Ust-Nera", "Asia/Magadan", "Asia/Sakhalin", "Asia/Srednekolymsk", "Asia/Kamchatka", "Asia/Anadyr", "Africa/Kigali", "Asia/Riyadh", "Pacific/Guadalcanal", "Indian/Mahe", "Africa/Khartoum", "Europe/Stockholm", "Asia/Singapore", "Atlantic/St_Helena", "Europe/Ljubljana", "Arctic/Longyearbyen", "Europe/Bratislava", "Africa/Freetown", "Europe/San_Marino", "Africa/Dakar", "Africa/Mogadishu", "America/Paramaribo", "Africa/Juba", "Africa/Sao_Tome", "America/El_Salvador", "America/Lower_Princes", "Asia/Damascus", "Africa/Mbabane", "America/Grand_Turk", "Africa/Ndjamena", "Indian/Kerguelen", "Africa/Lome", "Asia/Bangkok", "Asia/Dushanbe", "Pacific/Fakaofo", "Asia/Dili", "Asia/Ashgabat", "Africa/Tunis", "Pacific/Tongatapu", "Europe/Istanbul", "America/Port_of_Spain", "Pacific/Funafuti", "Asia/Taipei", "Africa/Dar_es_Salaam", "Europe/Kyiv", "Africa/Kampala", "Pacific/Midway", "Pacific/Wake", "America/New_York", "America/Detroit", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Indiana/Indianapolis", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Vevay", "America/Chicago", "America/Indiana/Tell_City", "America/Indiana/Knox", "America/Menominee", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/North_Dakota/Beulah", "America/Denver", "America/Boise", "America/Phoenix", "America/Los_Angeles", "America/Anchorage", "America/Juneau", "America/Sitka", "America/Metlakatla", "America/Yakutat", "America/Nome", "America/Adak", "Pacific/Honolulu", "America/Montevideo", "Asia/Samarkand", "Asia/Tashkent", "Europe/Vatican", "America/St_Vincent", "America/Caracas", "America/Tortola", "America/St_Thomas", "Asia/Ho_Chi_Minh", "Pacific/Efate", "Pacific/Wallis", "Pacific/Apia", "Asia/Aden", "Indian/Mayotte", "Africa/Johannesburg", "Africa/Lusaka", "Africa/Harare", "UTC" ] } }, "securitySchemes": { "oAuth2": { "type": "oauth2", "description": "This API uses OAuth 2 with the authorizationCode or clientCredentials (DEPRECATED) flows.", "flows": { "authorizationCode": { "tokenUrl": "https://aworld.cloud/oauth2/token", "refreshUrl": "https://aworld.cloud/oauth2/refresh", "authorizationUrl": "https://aworld.cloud/oauth2/authorize", "scopes": {} }, "clientCredentials": { "tokenUrl": "https://aworld.cloud/oauth2/token", "refreshUrl": "https://aworld.cloud/oauth2/refresh", "scopes": {} } } } } }, "tags": [ { "name": "ActivityLogs" }, { "name": "Missions" }, { "name": "Quizzes" }, { "name": "Quizzes/Tags" }, { "name": "Quizzes/Translation" }, { "name": "Streaks" }, { "name": "Stories" }, { "name": "Stories/Tags" }, { "name": "Stories/Translation" }, { "name": "Users" }, { "name": "Users/Tags" }, { "name": "VirtualBalances" }, { "name": "VirtualTransactions" } ], "security": [ { "oAuth2": [] } ], "webhooks": {} }