{
  "openapi": "3.1.0",
  "info": {
    "title": "Mobitree API",
    "version": "1.0.0",
    "description": "Authenticated JSON REST API for Mobitree Studio. See API.md for conventions and support guidance."
  },
  "servers": [{"url": "https://mobitr.ee", "description": "Production"}],
  "x-mobitree-versioning": {"current": "v1", "basePath": "/api/v1", "legacyBasePath": "/api", "legacyStatus": "compatibility"},
  "tags": [
    {"name": "Authentication"},
    {"name": "Profile"},
    {"name": "Links"},
    {"name": "Profile tools"},
    {"name": "Billing"},
    {"name": "Analytics"},
    {"name": "Administration"}
  ],
  "security": [{"bearerAuth": []}, {"apiKey": []}],
  "paths": {
    "/api/auth/register": {"post": {"tags":["Authentication"],"operationId":"register","summary":"Register a user","description":"Create an account. Browser sessions require CSRF and accepted terms.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}}},"responses":{"200":{"description":"User created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},
    "/api/auth/login": {"post": {"tags":["Authentication"],"operationId":"login","summary":"Sign in","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"202":{"description":"Two-factor challenge required"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},
    "/api/auth/2fa": {"post": {"tags":["Authentication"],"operationId":"completeTwoFactorLogin","summary":"Complete two-factor sign-in","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}}}}},"responses":{"200":{"description":"Signed in"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},
    "/api/auth/logout": {"post": {"tags":["Authentication"],"operationId":"logout","summary":"Sign out","responses":{"200":{"description":"Signed out"}}}},
    "/api/auth/password-reset/request": {"post": {"tags":["Authentication"],"operationId":"requestPasswordReset","summary":"Request a password reset","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Reset request accepted"}}}},
    "/api/auth/password-reset/confirm": {"post": {"tags":["Authentication"],"operationId":"confirmPasswordReset","summary":"Confirm a password reset","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","password"],"properties":{"token":{"type":"string"},"password":{"type":"string","format":"password"}}}}}},"responses":{"200":{"description":"Password reset"},"422":{"$ref":"#/components/responses/ValidationError"}}}},
    "/api/profile": {"get":{"tags":["Profile"],"operationId":"getProfile","summary":"Get the current profile","responses":{"200":{"$ref":"#/components/responses/ProfileResponse"}}},"put":{"tags":["Profile"],"operationId":"updateProfile","summary":"Update public profile settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/ProfileResponse"},"403":{"$ref":"#/components/responses/Forbidden"}}}},
    "/api/profile/avatar": {"post":{"tags":["Profile"],"operationId":"replaceAvatar","summary":"Replace the profile avatar","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"avatar":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Avatar replaced"},"422":{"$ref":"#/components/responses/ValidationError"}}}},
    "/api/links": {"get":{"tags":["Links"],"operationId":"listLinks","summary":"List profile links","parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"$ref":"#/components/responses/LinkListResponse"}}},"post":{"tags":["Links"],"operationId":"createLink","summary":"Create a profile link","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWrite"}}}},"responses":{"200":{"$ref":"#/components/responses/LinkResponse"},"422":{"$ref":"#/components/responses/ValidationError"}}}},
    "/api/links/{id}": {"parameters":[{"$ref":"#/components/parameters/LinkId"}],"put":{"tags":["Links"],"operationId":"updateLink","summary":"Update a profile link","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWrite"}}}},"responses":{"200":{"$ref":"#/components/responses/LinkResponse"},"409":{"$ref":"#/components/responses/Conflict"}}},"delete":{"tags":["Links"],"operationId":"archiveLink","summary":"Archive a profile link","responses":{"200":{"description":"Link archived"}}}},
    "/api/links/reorder": {"post":{"tags":["Links"],"operationId":"reorderLinks","summary":"Reorder profile links","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"Links reordered"}}}},
    "/api/profiles/{profile_id}/variants": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"get":{"tags":["Profile tools"],"operationId":"listProfileVariants","summary":"List Dynamic Profile variants","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"post":{"tags":["Profile tools"],"operationId":"createProfileVariant","summary":"Create a Dynamic Profile variant","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"403":{"$ref":"#/components/responses/Forbidden"}}}},
    "/api/profiles/{profile_id}/variants/{variant_id}": {"parameters":[{"$ref":"#/components/parameters/ProfileId"},{"$ref":"#/components/parameters/VariantId"}],"put":{"tags":["Profile tools"],"operationId":"updateProfileVariant","summary":"Update a Dynamic Profile variant","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"409":{"$ref":"#/components/responses/Conflict"}}},"delete":{"tags":["Profile tools"],"operationId":"archiveProfileVariant","summary":"Archive a Dynamic Profile variant","responses":{"200":{"description":"Variant archived"}}}},
    "/api/profiles/{profile_id}/campaigns": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"get":{"tags":["Profile tools"],"operationId":"listCampaigns","summary":"List profile campaigns","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"post":{"tags":["Profile tools"],"operationId":"createCampaign","summary":"Create a profile campaign","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"403":{"$ref":"#/components/responses/Forbidden"}}}},
    "/api/profiles/{profile_id}/campaigns/{campaign_id}": {"parameters":[{"$ref":"#/components/parameters/ProfileId"},{"$ref":"#/components/parameters/CampaignId"}],"put":{"tags":["Profile tools"],"operationId":"updateCampaign","summary":"Update a profile campaign","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"409":{"$ref":"#/components/responses/Conflict"}}},"delete":{"tags":["Profile tools"],"operationId":"archiveCampaign","summary":"Archive a profile campaign","responses":{"200":{"description":"Campaign archived"}}}},
    "/api/profiles/{profile_id}/versions": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"get":{"tags":["Profile tools"],"operationId":"listProfileVersions","summary":"List profile versions","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"post":{"tags":["Profile tools"],"operationId":"createProfileVersion","summary":"Create a named restore point","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/versions/{version_id}": {"parameters":[{"$ref":"#/components/parameters/ProfileId"},{"$ref":"#/components/parameters/VersionId"}],"get":{"tags":["Profile tools"],"operationId":"getProfileVersion","summary":"Review a profile version","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"delete":{"tags":["Profile tools"],"operationId":"deleteProfileVersion","summary":"Delete a profile version","responses":{"200":{"description":"Version deleted"}}}},
    "/api/profiles/{profile_id}/versions/{version_id}/restore": {"parameters":[{"$ref":"#/components/parameters/ProfileId"},{"$ref":"#/components/parameters/VersionId"}],"post":{"tags":["Profile tools"],"operationId":"restoreProfileVersion","summary":"Restore a reviewed profile version","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"description":"Profile restored"},"409":{"$ref":"#/components/responses/Conflict"}}}},
    "/api/profiles/{profile_id}/doctor": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"get":{"tags":["Profile tools"],"operationId":"getProfileDoctor","summary":"Read Profile Doctor findings","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/doctor/analyze": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"post":{"tags":["Profile tools"],"operationId":"analyzeProfile","summary":"Run Profile Doctor analysis","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/doctor/runs/{run_id}/recommendations/{recommendation_id}/apply": {"parameters":[{"$ref":"#/components/parameters/ProfileId"},{"$ref":"#/components/parameters/RunId"},{"$ref":"#/components/parameters/RecommendationId"}],"post":{"tags":["Profile tools"],"operationId":"applyDoctorRecommendation","summary":"Apply a Profile Doctor recommendation","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"409":{"$ref":"#/components/responses/Conflict"}}}},
    "/api/profiles/{profile_id}/doctor/actions/{action_id}/undo": {"parameters":[{"$ref":"#/components/parameters/ProfileId"},{"$ref":"#/components/parameters/ActionId"}],"post":{"tags":["Profile tools"],"operationId":"undoDoctorAction","summary":"Undo a Profile Doctor action","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"409":{"$ref":"#/components/responses/Conflict"}}}},
    "/api/profiles/{profile_id}/ai-content": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"get":{"tags":["Profile tools"],"operationId":"getAiContent","summary":"List saved AI content ideas","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/ai-content/generate": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"post":{"tags":["Profile tools"],"operationId":"generateAiContent","summary":"Generate AI content suggestions","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/smart-alerts": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"get":{"tags":["Profile tools"],"operationId":"listSmartAlerts","summary":"List smart alerts","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/smart-alerts/preferences": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"put":{"tags":["Profile tools"],"operationId":"updateSmartAlertPreferences","summary":"Update smart alert preferences","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/profiles/{profile_id}/smart-alerts/read": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"post":{"tags":["Profile tools"],"operationId":"markSmartAlertsRead","summary":"Mark smart alerts read","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"description":"Alerts marked read"}}}},
    "/api/workspaces": {"get":{"tags":["Profile tools"],"operationId":"listWorkspaces","summary":"List agency workspaces","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"post":{"tags":["Profile tools"],"operationId":"createWorkspace","summary":"Create an agency workspace","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"201":{"$ref":"#/components/responses/SuccessResponse"},"403":{"$ref":"#/components/responses/Forbidden"}}}},
    "/api/workspaces/{workspace_id}": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"}],"get":{"tags":["Profile tools"],"operationId":"getWorkspace","summary":"Get one agency workspace","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"put":{"tags":["Profile tools"],"operationId":"updateWorkspace","summary":"Update an agency workspace","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"409":{"$ref":"#/components/responses/Conflict"}}},"delete":{"tags":["Profile tools"],"operationId":"archiveWorkspace","summary":"Archive an agency workspace","responses":{"200":{"description":"Workspace archived"}}}},
    "/api/workspaces/{workspace_id}/profiles": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"}],"put":{"tags":["Profile tools"],"operationId":"saveWorkspaceProfiles","summary":"Set profiles assigned to a workspace","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/workspaces/{workspace_id}/summary": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"}],"get":{"tags":["Profile tools"],"operationId":"getWorkspaceSummary","summary":"Get workspace summary","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/workspaces/{workspace_id}/invites": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"}],"post":{"tags":["Profile tools"],"operationId":"inviteWorkspaceMember","summary":"Invite a workspace collaborator","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"201":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/workspaces/{workspace_id}/members/{member_id}": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"},{"$ref":"#/components/parameters/MemberId"}],"put":{"tags":["Profile tools"],"operationId":"updateWorkspaceMember","summary":"Update a workspace collaborator","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}},"delete":{"tags":["Profile tools"],"operationId":"removeWorkspaceMember","summary":"Remove a workspace collaborator","responses":{"200":{"description":"Member removed"}}}},
    "/api/workspaces/{workspace_id}/transfers": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"}],"post":{"tags":["Profile tools"],"operationId":"createWorkspaceTransfer","summary":"Request profile ownership transfer","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"201":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/workspaces/{workspace_id}/transfers/{transfer_id}": {"parameters":[{"$ref":"#/components/parameters/WorkspaceId"},{"$ref":"#/components/parameters/TransferId"}],"delete":{"tags":["Profile tools"],"operationId":"cancelWorkspaceTransfer","summary":"Cancel a pending ownership transfer","responses":{"200":{"description":"Transfer cancelled"}}}},
    "/api/business-blocks/upload": {"post":{"tags":["Links"],"operationId":"uploadBusinessBlockAsset","summary":"Upload a business-block asset","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"422":{"$ref":"#/components/responses/ValidationError"}}}},
    "/api/forms/submissions": {"get":{"tags":["Profile tools"],"operationId":"listFormSubmissions","summary":"List profile form submissions","parameters":[{"name":"profile_id","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/forms/{form_id}/submissions": {"parameters":[{"$ref":"#/components/parameters/FormId"}],"get":{"tags":["Profile tools"],"operationId":"listFormSubmissionsForForm","summary":"List submissions for one form","parameters":[{"name":"profile_id","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/billing/plans": {"get":{"tags":["Billing"],"operationId":"listPlans","summary":"List available plans","security":[],"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/billing/checkout": {"post":{"tags":["Billing"],"operationId":"createCheckout","summary":"Create a billing checkout session","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/billing/portal": {"post":{"tags":["Billing"],"operationId":"createCustomerPortal","summary":"Create a customer portal session","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/billing/customer-portal": {"post":{"tags":["Billing"],"operationId":"createCustomerPortalAlias","summary":"Create a customer portal session (alias)","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/billing/apply-voucher": {"post":{"tags":["Billing"],"operationId":"applyVoucher","summary":"Apply a billing voucher","requestBody":{"$ref":"#/components/requestBodies/JsonObject"},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"422":{"$ref":"#/components/responses/ValidationError"}}}},
    "/api/analytics/overview": {"get":{"tags":["Analytics"],"operationId":"analyticsOverview","summary":"Read profile analytics overview","parameters":[{"$ref":"#/components/parameters/DateFrom"},{"$ref":"#/components/parameters/DateTo"}],"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/analytics/heatmaps": {"get":{"tags":["Analytics"],"operationId":"analyticsHeatmaps","summary":"Read interaction heatmaps","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/analytics/variants": {"get":{"tags":["Analytics"],"operationId":"analyticsVariants","summary":"Read Dynamic Profile analytics","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/analytics/campaigns": {"get":{"tags":["Analytics"],"operationId":"analyticsCampaigns","summary":"Read campaign analytics","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/analytics/links": {"get":{"tags":["Analytics"],"operationId":"analyticsLinks","summary":"Read link analytics","parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/admin/users": {"get":{"tags":["Administration"],"operationId":"adminListUsers","summary":"List users for platform administration","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},
    "/api/admin/users/{id}/block": {"parameters":[{"$ref":"#/components/parameters/UserId"}],"put":{"tags":["Administration"],"operationId":"adminBlockUser","summary":"Block a user","responses":{"200":{"description":"User blocked"}}}},
    "/api/admin/users/{id}/unblock": {"parameters":[{"$ref":"#/components/parameters/UserId"}],"put":{"tags":["Administration"],"operationId":"adminUnblockUser","summary":"Unblock a user","responses":{"200":{"description":"User unblocked"}}}},
    "/api/admin/profiles": {"get":{"tags":["Administration"],"operationId":"adminListProfiles","summary":"List profiles for platform administration","responses":{"200":{"$ref":"#/components/responses/SuccessResponse"}}}},
    "/api/admin/profiles/{id}/block": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"put":{"tags":["Administration"],"operationId":"adminBlockProfile","summary":"Block a profile","responses":{"200":{"description":"Profile blocked"}}}},
    "/api/admin/profiles/{id}/unblock": {"parameters":[{"$ref":"#/components/parameters/ProfileId"}],"put":{"tags":["Administration"],"operationId":"adminUnblockProfile","summary":"Unblock a profile","responses":{"200":{"description":"Profile unblocked"}}}}
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {"type":"http","scheme":"bearer","bearerFormat":"Personal API key"},
      "apiKey": {"type":"apiKey","in":"header","name":"X-API-Key"}
    },
    "parameters": {
      "Page": {"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},
      "Limit": {"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},
      "DateFrom": {"name":"from","in":"query","schema":{"type":"string","format":"date"}},
      "DateTo": {"name":"to","in":"query","schema":{"type":"string","format":"date"}},
      "LinkId": {"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "UserId": {"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "ProfileId": {"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "VariantId": {"name":"variant_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "CampaignId": {"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "VersionId": {"name":"version_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "WorkspaceId": {"name":"workspace_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "MemberId": {"name":"member_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "TransferId": {"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "FormId": {"name":"form_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "RunId": {"name":"run_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},
      "RecommendationId": {"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string"}},
      "ActionId": {"name":"action_id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}
    },
    "requestBodies": {"JsonObject":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},
    "schemas": {
      "Success": {"type":"object","required":["ok"],"properties":{"ok":{"const":true},"data":{"type":"object","additionalProperties":true}}},
      "Profile": {"type":"object","additionalProperties":true,"description":"Profile DTO returned by the current user’s access scope."},
      "Link": {"type":"object","additionalProperties":true,"description":"Profile link DTO. Business blocks include business_block_config."},
      "RegisterRequest": {"type":"object","required":["email","password","name","accept_terms"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password"},"name":{"type":"string"},"access_code":{"type":"string"},"accept_terms":{"type":"boolean"}}},
      "LoginRequest": {"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password"},"remember":{"type":"boolean"}}},
      "ProfileUpdate": {"type":"object","additionalProperties":true,"description":"Public settings accepted by the Studio profile editor."},
      "LinkWrite": {"type":"object","required":["title","url"],"properties":{"title":{"type":"string"},"url":{"type":"string","format":"uri"},"kind":{"type":"string"},"supporting_text":{"type":"string"},"order":{"type":"integer"},"business_block_config":{"type":"object","additionalProperties":true}},"additionalProperties":true},
      "Pagination": {"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},
      "Error": {"type":"object","required":["ok","errors"],"properties":{"ok":{"const":false},"errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}}}
    },
    "responses": {
      "SuccessResponse": {"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},
      "ProfileResponse": {"description":"Profile response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Success"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Profile"}}}]}}}},
      "LinkResponse": {"description":"Link response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Success"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Link"}}}]}}}},
      "LinkListResponse": {"description":"Paginated link list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Success"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"meta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}]}}}},
      "Unauthorized": {"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},
      "Forbidden": {"description":"Authenticated but not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},
      "ValidationError": {"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},
      "Conflict": {"description":"The resource changed since it was reviewed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}
    }
  }
}
