{"openapi":"3.1.0","info":{"title":"kna.sh","description":"Link shortener for kna.sh","version":"3.0.0"},"paths":{"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Confirm signup with the code from the email, then start a session.","operationId":"verify_email_api_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Resend signup confirmation code. Generic response for unknown emails.","operationId":"resend_verification_api_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/goknash-stamp":{"post":{"tags":["auth"],"summary":"Create Goknash Stamp","description":"Create a one-time URL on bare host ``go`` that sets the goknash cookie.\n\nOpen ``url`` in a browser that can resolve host ``go`` (HTTP). The ticket is\ndeleted after the first successful visit (or when it expires).","operationId":"create_goknash_stamp_api_v1_auth_goknash_stamp_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoknashStampResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/roles":{"get":{"tags":["auth"],"summary":"List Roles","operationId":"list_roles_api_v1_auth_roles_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Roles Api V1 Auth Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Email a one-time password-reset link. Always returns a generic message.","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Set a new password using a one-time token from the reset email.","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/passkey":{"get":{"tags":["passkeys"],"summary":"List My Passkeys","operationId":"list_my_passkeys_api_v1_auth_passkey_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PasskeyCredentialResponse"},"title":"Response List My Passkeys Api V1 Auth Passkey Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/passkey/register/options":{"post":{"tags":["passkeys"],"summary":"Register Options","operationId":"register_options_api_v1_auth_passkey_register_options_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterOptionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Register Options Api V1 Auth Passkey Register Options Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/passkey/register/verify":{"post":{"tags":["passkeys"],"summary":"Register Verify","operationId":"register_verify_api_v1_auth_passkey_register_verify_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyCredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/passkey/{passkey_id}":{"delete":{"tags":["passkeys"],"summary":"Delete Passkey","operationId":"delete_passkey_api_v1_auth_passkey__passkey_id__delete","parameters":[{"name":"passkey_id","in":"path","required":true,"schema":{"type":"string","title":"Passkey Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/passkey/login/options":{"post":{"tags":["passkeys"],"summary":"Login Options","operationId":"login_options_api_v1_auth_passkey_login_options_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyLoginOptionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Login Options Api V1 Auth Passkey Login Options Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/passkey/login/verify":{"post":{"tags":["passkeys"],"summary":"Login Verify","operationId":"login_verify_api_v1_auth_passkey_login_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyLoginVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/links":{"get":{"tags":["links"],"summary":"List Links","operationId":"list_links_api_v1_links_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkResponse"},"title":"Response List Links Api V1 Links Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["links"],"summary":"Create Link","operationId":"create_link_api_v1_links_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/links/check-slug":{"get":{"tags":["links"],"summary":"Check Custom Slug","description":"Live availability check for a vanity custom path.","operationId":"check_custom_slug_api_v1_links_check_slug_get","parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Slug"}},{"name":"exclude_link_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When editing, pass the current link id so its own slug counts as available","title":"Exclude Link Id"},"description":"When editing, pass the current link id so its own slug counts as available"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/links/{link_id}":{"get":{"tags":["links"],"summary":"Get Link","operationId":"get_link_api_v1_links__link_id__get","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["links"],"summary":"Update Link","operationId":"update_link_api_v1_links__link_id__patch","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["links"],"summary":"Delete Link","operationId":"delete_link_api_v1_links__link_id__delete","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/links/{link_id}/qrcode":{"get":{"tags":["links","qrcode"],"summary":"Link Qrcode","description":"Generate a QR code for the link's public short URL using Segno.","operationId":"link_qrcode_api_v1_links__link_id__qrcode_get","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"png or svg","default":"png","title":"Format"},"description":"png or svg"},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"QR mode: auto, numeric, alphanumeric, byte, kanji, hanzi","default":"auto","title":"Mode"},"description":"QR mode: auto, numeric, alphanumeric, byte, kanji, hanzi"},{"name":"error","in":"query","required":false,"schema":{"type":"string","description":"Error correction: L, M, Q, H","default":"M","title":"Error"},"description":"Error correction: L, M, Q, H"},{"name":"boost_error","in":"query","required":false,"schema":{"type":"boolean","description":"Allow Segno to boost error correction","default":true,"title":"Boost Error"},"description":"Allow Segno to boost error correction"},{"name":"color","in":"query","required":false,"schema":{"type":"string","description":"Foreground (module) color","default":"#000000","title":"Color"},"description":"Foreground (module) color"},{"name":"light","in":"query","required":false,"schema":{"type":"string","description":"Background color","default":"#ffffff","title":"Light"},"description":"Background color"},{"name":"scale","in":"query","required":false,"schema":{"type":"integer","maximum":40,"minimum":1,"default":8,"title":"Scale"}},{"name":"border","in":"query","required":false,"schema":{"type":"integer","maximum":16,"minimum":0,"default":2,"title":"Border"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"If true, set Content-Disposition attachment","default":false,"title":"Download"},"description":"If true, set Content-Disposition attachment"},{"name":"url_kind","in":"query","required":false,"schema":{"type":"string","description":"Which short URL to encode: auto (ID-based) or custom (vanity path on go.kna.sh)","default":"auto","title":"Url Kind"},"description":"Which short URL to encode: auto (ID-based) or custom (vanity path on go.kna.sh)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clicks":{"get":{"tags":["clicks"],"summary":"List Clicks","operationId":"list_clicks_api_v1_clicks_get","parameters":[{"name":"link_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickResponse"},"title":"Response List Clicks Api V1 Clicks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clicks/report":{"get":{"tags":["clicks"],"summary":"Clicks Report","description":"Aggregate click report with breakdowns and recent events.","operationId":"clicks_report_api_v1_clicks_report_get","parameters":[{"name":"link_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClicksReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys":{"get":{"tags":["api-keys"],"summary":"List Api Keys","operationId":"list_api_keys_api_v1_api_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"},"title":"Response List Api Keys Api V1 Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api-keys"],"summary":"Create Api Key","operationId":"create_api_key_api_v1_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}":{"get":{"tags":["api-keys"],"summary":"Get Api Key","operationId":"get_api_key_api_v1_api_keys__key_id__get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["api-keys"],"summary":"Update Api Key","operationId":"update_api_key_api_v1_api_keys__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["api-keys"],"summary":"Delete Api Key","operationId":"delete_api_key_api_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_api_v1_users_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponse"},"title":"Response List Users Api V1 Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Create User","operationId":"create_user_api_v1_users_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","operationId":"get_user_api_v1_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["users"],"summary":"Update User","operationId":"update_user_api_v1_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","operationId":"delete_user_api_v1_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeleteUserRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer":{"get":{"tags":["customer"],"summary":"Get Customer","operationId":"get_customer_api_v1_customer_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["customer"],"summary":"Update Customer","description":"Update organization name, path prefix, branded host, and custom domain (admin only).","operationId":"update_customer_api_v1_customer_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/custom-domain/verify":{"post":{"tags":["customer"],"summary":"Verify Custom Domain","description":"Re-check that the claimed custom domain CNAMEs to cd.kna.sh (or configured target).","operationId":"verify_custom_domain_api_v1_customer_custom_domain_verify_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCustomDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/overview":{"get":{"tags":["super-admin"],"summary":"Overview","operationId":"overview_api_v1_super_admin_overview_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/users/{user_id}":{"patch":{"tags":["super-admin"],"summary":"Update User Roles","description":"Assign roles / active status (including super_admin) — only available here.","operationId":"update_user_roles_api_v1_super_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminUpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["super-admin"],"summary":"Delete User","description":"Permanently delete a user from any account. Cannot delete yourself.","operationId":"delete_user_api_v1_super_admin_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeleteUserRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/customers/{customer_id}":{"patch":{"tags":["super-admin"],"summary":"Update Customer Platform","description":"Enable or disable an organization (and optionally rename).","operationId":"update_customer_platform_api_v1_super_admin_customers__customer_id__patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminUpdateCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/customers/merge":{"post":{"tags":["super-admin"],"summary":"Merge Customers","description":"Merge source organization into target. Source is deleted; its branding is released.\n\nMoves users, links, API keys, click history, and active sessions to the target account.\nTarget name, hostname, and path prefix are kept.","operationId":"merge_customers_api_v1_super_admin_customers_merge_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminMergeCustomersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminMergeCustomersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/users/{user_id}/reset-password":{"post":{"tags":["super-admin"],"summary":"Reset User Password","description":"Generate a strong temporary password, set it on the user, and invalidate sessions.\n\nThe plain password is returned once for the super-admin to copy.","operationId":"reset_user_password_api_v1_super_admin_users__user_id__reset_password_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/roles":{"get":{"tags":["super-admin"],"summary":"Super Admin Roles","operationId":"super_admin_roles_api_v1_super_admin_roles_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Super Admin Roles Api V1 Super Admin Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/settings":{"get":{"tags":["super-admin"],"summary":"Get Settings","operationId":"get_settings_api_v1_super_admin_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["super-admin"],"summary":"Update Settings","operationId":"update_settings_api_v1_super_admin_settings_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/test-email":{"post":{"tags":["super-admin"],"summary":"Test Email","operationId":"test_email_api_v1_super_admin_test_email_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminTestEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/super-admin/login-history":{"get":{"tags":["super-admin"],"summary":"Login History","operationId":"login_history_api_v1_super_admin_login_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoginEventResponse"},"title":"Response Login History Api V1 Super Admin Login History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knash-healthz":{"get":{"tags":["ops"],"summary":"Healthz","operationId":"healthz_knash_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/config":{"get":{"tags":["ops"],"summary":"Public Config","description":"Frontend bootstrap: absolute hosts for multi-host deploys.","operationId":"public_config_api_v1_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Public Config Api V1 Config Get"}}}}}}},"/api/v1/shorten":{"post":{"tags":["links"],"summary":"Shorten Compat","operationId":"shorten_compat_api_v1_shorten_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"knash_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knash Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"created_at":{"type":"integer","title":"Created At"},"last_used_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Used At"},"revoked":{"type":"boolean","title":"Revoked"},"created_by":{"type":"string","title":"Created By"}},"type":"object","required":["id","name","key_prefix","roles","created_at","last_used_at","revoked","created_by"],"title":"ApiKeyResponse"},"ClickResponse":{"properties":{"id":{"type":"string","title":"Id"},"link_id":{"type":"string","title":"Link Id"},"short_url":{"type":"string","title":"Short Url","default":""},"created_at":{"type":"integer","title":"Created At"},"region":{"type":"string","title":"Region"},"sub_region":{"type":"string","title":"Sub Region"},"city":{"type":"string","title":"City"},"device_type":{"type":"string","title":"Device Type"},"coordinates":{"type":"string","title":"Coordinates"},"client_ip":{"type":"string","title":"Client Ip"},"user_agent":{"type":"string","title":"User Agent","default":""}},"type":"object","required":["id","link_id","created_at","region","sub_region","city","device_type","coordinates","client_ip"],"title":"ClickResponse"},"ClicksReportResponse":{"properties":{"total":{"type":"integer","title":"Total"},"by_region":{"items":{"$ref":"#/components/schemas/CountBucket"},"type":"array","title":"By Region"},"by_sub_region":{"items":{"$ref":"#/components/schemas/CountBucket"},"type":"array","title":"By Sub Region"},"by_city":{"items":{"$ref":"#/components/schemas/CountBucket"},"type":"array","title":"By City"},"by_device_type":{"items":{"$ref":"#/components/schemas/CountBucket"},"type":"array","title":"By Device Type"},"by_link":{"items":{"$ref":"#/components/schemas/CountBucket"},"type":"array","title":"By Link"},"clicks":{"items":{"$ref":"#/components/schemas/ClickResponse"},"type":"array","title":"Clicks"}},"type":"object","required":["total","by_region","by_sub_region","by_city","by_device_type","by_link","clicks"],"title":"ClicksReportResponse"},"CountBucket":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["key","count"],"title":"CountBucket"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["name"],"title":"CreateApiKeyRequest"},"CreateApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"created_at":{"type":"integer","title":"Created At"},"last_used_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Used At"},"revoked":{"type":"boolean","title":"Revoked"},"created_by":{"type":"string","title":"Created By"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","roles","created_at","last_used_at","revoked","created_by","key"],"title":"CreateApiKeyResponse"},"CreateLinkRequest":{"properties":{"url":{"type":"string","title":"Url"},"title":{"type":"string","maxLength":200,"title":"Title","default":""},"custom_slug":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Custom Slug"}},"type":"object","required":["url"],"title":"CreateLinkRequest"},"CreateUserRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["name","email","password","roles"],"title":"CreateUserRequest"},"CustomerResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"integer","title":"Created At"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"path_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Prefix"},"custom_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Host"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"type":"boolean","title":"Custom Domain Verified","default":false},"custom_domain_cname_target":{"type":"string","title":"Custom Domain Cname Target","default":"cd.kna.sh"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["id","name","created_at"],"title":"CustomerResponse"},"DeleteUserRequest":{"properties":{"disable_created_links":{"type":"boolean","title":"Disable Created Links","default":false},"deactivate_created_links":{"type":"boolean","title":"Deactivate Created Links","default":false}},"type":"object","title":"DeleteUserRequest","description":"Optional body for DELETE /users/{id} cascade options."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GoknashStampResponse":{"properties":{"ticket_id":{"type":"string","title":"Ticket Id"},"path":{"type":"string","title":"Path"},"url":{"type":"string","title":"Url"},"expires_at":{"type":"integer","title":"Expires At"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["ticket_id","path","url","expires_at","expires_in_seconds"],"title":"GoknashStampResponse","description":"One-time URL on bare host go to set the org cookie."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"service":{"type":"string","title":"Service","default":"kna.sh"}},"type":"object","required":["status"],"title":"HealthResponse"},"LinkResponse":{"properties":{"id":{"type":"string","title":"Id"},"short_url":{"type":"string","title":"Short Url"},"auto_short_url":{"type":"string","title":"Auto Short Url"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"created_at":{"type":"integer","title":"Created At"},"updated_at":{"type":"integer","title":"Updated At"},"hits":{"type":"integer","title":"Hits"},"hits_404":{"type":"integer","title":"Hits 404","default":0},"hits_410":{"type":"integer","title":"Hits 410","default":0},"created_by":{"type":"string","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"customer_id":{"type":"string","title":"Customer Id"},"custom_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Slug"},"enabled":{"type":"boolean","title":"Enabled","default":true},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["id","short_url","auto_short_url","url","title","created_at","updated_at","hits","created_by","customer_id"],"title":"LinkResponse"},"LoginEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"created_at":{"type":"integer","title":"Created At"},"client_ip":{"type":"string","title":"Client Ip"},"user_agent":{"type":"string","title":"User Agent"},"region":{"type":"string","title":"Region"},"sub_region":{"type":"string","title":"Sub Region"},"city":{"type":"string","title":"City"}},"type":"object","required":["id","user_id","email","name","created_at","client_ip","user_agent","region","sub_region","city"],"title":"LoginEventResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MeResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"customer":{"$ref":"#/components/schemas/CustomerResponse"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"auth_type":{"type":"string","title":"Auth Type"},"goknash_bootstrap_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goknash Bootstrap Url"}},"type":"object","required":["user","customer","permissions","auth_type"],"title":"MeResponse"},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse"},"PasskeyCredentialResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"integer","title":"Created At"},"last_used_at":{"type":"integer","title":"Last Used At"},"transports":{"items":{"type":"string"},"type":"array","title":"Transports","default":[]}},"type":"object","required":["id","name","created_at","last_used_at"],"title":"PasskeyCredentialResponse"},"PasskeyLoginOptionsRequest":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"type":"object","title":"PasskeyLoginOptionsRequest"},"PasskeyLoginVerifyRequest":{"properties":{"challenge_id":{"type":"string","maxLength":80,"minLength":1,"title":"Challenge Id"},"credential":{"type":"object","title":"Credential"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"type":"object","required":["challenge_id","credential"],"title":"PasskeyLoginVerifyRequest"},"PasskeyRegisterOptionsRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name"}},"type":"object","title":"PasskeyRegisterOptionsRequest"},"PasskeyRegisterVerifyRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name"},"challenge_id":{"type":"string","maxLength":80,"minLength":1,"title":"Challenge Id"},"credential":{"type":"object","title":"Credential"}},"type":"object","required":["challenge_id","credential"],"title":"PasskeyRegisterVerifyRequest"},"PlatformSettingsResponse":{"properties":{"email_verification_ttl_seconds":{"type":"integer","title":"Email Verification Ttl Seconds"},"password_reset_ttl_seconds":{"type":"integer","title":"Password Reset Ttl Seconds"},"session_idle_ttl_seconds":{"type":"integer","title":"Session Idle Ttl Seconds","default":1800},"smtp_host":{"type":"string","title":"Smtp Host"},"smtp_port":{"type":"integer","title":"Smtp Port"},"smtp_use_starttls":{"type":"boolean","title":"Smtp Use Starttls"},"smtp_use_ssl":{"type":"boolean","title":"Smtp Use Ssl"},"smtp_from":{"type":"string","title":"Smtp From"},"smtp_from_name":{"type":"string","title":"Smtp From Name","default":""},"smtp_user_secret":{"type":"string","title":"Smtp User Secret"},"smtp_password_secret":{"type":"string","title":"Smtp Password Secret"},"smtp_configured":{"type":"boolean","title":"Smtp Configured","default":false},"email_blacklist_patterns":{"items":{"type":"string"},"type":"array","title":"Email Blacklist Patterns","default":[]},"ua_preview_patterns":{"items":{"type":"string"},"type":"array","title":"Ua Preview Patterns","default":[]},"ua_premium_patterns":{"items":{"type":"string"},"type":"array","title":"Ua Premium Patterns","default":[]},"verification_email_subject":{"type":"string","title":"Verification Email Subject","default":""},"verification_email_text":{"type":"string","title":"Verification Email Text","default":""},"verification_email_html":{"type":"string","title":"Verification Email Html","default":""},"password_reset_email_subject":{"type":"string","title":"Password Reset Email Subject","default":""},"password_reset_email_text":{"type":"string","title":"Password Reset Email Text","default":""},"password_reset_email_html":{"type":"string","title":"Password Reset Email Html","default":""},"invitation_email_subject":{"type":"string","title":"Invitation Email Subject","default":""},"invitation_email_text":{"type":"string","title":"Invitation Email Text","default":""},"invitation_email_html":{"type":"string","title":"Invitation Email Html","default":""},"default_verification_email_subject":{"type":"string","title":"Default Verification Email Subject","default":""},"default_password_reset_email_subject":{"type":"string","title":"Default Password Reset Email Subject","default":""},"default_invitation_email_subject":{"type":"string","title":"Default Invitation Email Subject","default":""}},"type":"object","required":["email_verification_ttl_seconds","password_reset_ttl_seconds","smtp_host","smtp_port","smtp_use_starttls","smtp_use_ssl","smtp_from","smtp_user_secret","smtp_password_secret"],"title":"PlatformSettingsResponse"},"PlatformSettingsUpdateRequest":{"properties":{"email_verification_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":60.0},{"type":"null"}],"title":"Email Verification Ttl Seconds"},"password_reset_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":60.0},{"type":"null"}],"title":"Password Reset Ttl Seconds"},"session_idle_ttl_seconds":{"anyOf":[{"type":"integer","maximum":604800.0,"minimum":60.0},{"type":"null"}],"title":"Session Idle Ttl Seconds"},"smtp_host":{"anyOf":[{"type":"string","maxLength":253,"minLength":1},{"type":"null"}],"title":"Smtp Host"},"smtp_port":{"anyOf":[{"type":"integer","maximum":65535.0,"minimum":1.0},{"type":"null"}],"title":"Smtp Port"},"smtp_use_starttls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Smtp Use Starttls"},"smtp_use_ssl":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Smtp Use Ssl"},"smtp_from":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Smtp From"},"smtp_from_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Smtp From Name"},"smtp_user_secret":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Smtp User Secret"},"smtp_password_secret":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Smtp Password Secret"},"email_blacklist_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Email Blacklist Patterns"},"ua_preview_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ua Preview Patterns"},"ua_premium_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ua Premium Patterns"},"verification_email_subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Verification Email Subject"},"verification_email_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Verification Email Text"},"verification_email_html":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Verification Email Html"},"password_reset_email_subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Password Reset Email Subject"},"password_reset_email_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Password Reset Email Text"},"password_reset_email_html":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Password Reset Email Html"},"invitation_email_subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Invitation Email Subject"},"invitation_email_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Invitation Email Text"},"invitation_email_html":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Invitation Email Html"}},"type":"object","title":"PlatformSettingsUpdateRequest"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":256,"minLength":20,"title":"Token"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest"},"SignupRequest":{"properties":{"customer_name":{"type":"string","maxLength":120,"minLength":1,"title":"Customer Name"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["customer_name","name","email","password"],"title":"SignupRequest"},"SignupResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"customer":{"$ref":"#/components/schemas/CustomerResponse"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"email_verified":{"type":"boolean","title":"Email Verified","default":true},"message":{"type":"string","title":"Message","default":""},"goknash_bootstrap_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goknash Bootstrap Url"}},"type":"object","required":["user","customer","permissions"],"title":"SignupResponse"},"SlugCheckResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"available":{"type":"boolean","title":"Available"},"short_url":{"type":"string","title":"Short Url"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["slug","available","short_url"],"title":"SlugCheckResponse"},"SuperAdminAccountUsage":{"properties":{"customer":{"$ref":"#/components/schemas/CustomerResponse"},"user_count":{"type":"integer","title":"User Count"},"link_count":{"type":"integer","title":"Link Count"},"total_hits":{"type":"integer","title":"Total Hits"},"custom_slug_count":{"type":"integer","title":"Custom Slug Count"}},"type":"object","required":["customer","user_count","link_count","total_hits","custom_slug_count"],"title":"SuperAdminAccountUsage"},"SuperAdminMergeCustomersRequest":{"properties":{"source_customer_id":{"type":"string","maxLength":80,"minLength":1,"title":"Source Customer Id"},"target_customer_id":{"type":"string","maxLength":80,"minLength":1,"title":"Target Customer Id"},"confirm":{"type":"string","maxLength":20,"minLength":1,"title":"Confirm"}},"type":"object","required":["source_customer_id","target_customer_id","confirm"],"title":"SuperAdminMergeCustomersRequest","description":"Merge source organization into target; source is deleted after reassignment."},"SuperAdminMergeCustomersResponse":{"properties":{"source_customer_id":{"type":"string","title":"Source Customer Id"},"target_customer_id":{"type":"string","title":"Target Customer Id"},"target":{"$ref":"#/components/schemas/CustomerResponse"},"moved":{"additionalProperties":{"type":"integer"},"type":"object","title":"Moved"},"message":{"type":"string","title":"Message","default":"Organizations merged successfully."}},"type":"object","required":["source_customer_id","target_customer_id","target","moved"],"title":"SuperAdminMergeCustomersResponse"},"SuperAdminOverviewResponse":{"properties":{"customers":{"items":{"$ref":"#/components/schemas/CustomerResponse"},"type":"array","title":"Customers"},"users":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Users"},"links":{"items":{"$ref":"#/components/schemas/LinkResponse"},"type":"array","title":"Links"},"usage":{"items":{"$ref":"#/components/schemas/SuperAdminAccountUsage"},"type":"array","title":"Usage"},"totals":{"additionalProperties":{"type":"integer"},"type":"object","title":"Totals"}},"type":"object","required":["customers","users","links","usage","totals"],"title":"SuperAdminOverviewResponse"},"SuperAdminResetPasswordResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"temporary_password":{"type":"string","title":"Temporary Password"},"message":{"type":"string","title":"Message","default":"Temporary password generated. Copy it now — it will not be shown again."}},"type":"object","required":["user","temporary_password"],"title":"SuperAdminResetPasswordResponse","description":"One-time temporary password after a super-admin reset."},"SuperAdminTestEmailRequest":{"properties":{"to":{"type":"string","format":"email","title":"To"}},"type":"object","required":["to"],"title":"SuperAdminTestEmailRequest"},"SuperAdminUpdateCustomerRequest":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","title":"SuperAdminUpdateCustomerRequest","description":"Platform-level organization updates (active status, optional name)."},"SuperAdminUpdateUserRequest":{"properties":{"roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Roles"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"disable_created_links":{"type":"boolean","title":"Disable Created Links","default":false},"deactivate_created_links":{"type":"boolean","title":"Deactivate Created Links","default":false}},"type":"object","title":"SuperAdminUpdateUserRequest"},"UpdateApiKeyRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Roles"},"revoked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Revoked"}},"type":"object","title":"UpdateApiKeyRequest"},"UpdateCustomerRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"path_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Prefix"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"verify_custom_domain":{"type":"boolean","title":"Verify Custom Domain","default":false}},"type":"object","title":"UpdateCustomerRequest"},"UpdateLinkRequest":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"custom_slug":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Custom Slug"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"UpdateLinkRequest"},"UpdateUserRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Password"},"roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Roles"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"disable_created_links":{"type":"boolean","title":"Disable Created Links","default":false},"deactivate_created_links":{"type":"boolean","title":"Deactivate Created Links","default":false}},"type":"object","title":"UpdateUserRequest"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"created_at":{"type":"integer","title":"Created At"},"active":{"type":"boolean","title":"Active"},"email_verified":{"type":"boolean","title":"Email Verified","default":true}},"type":"object","required":["id","customer_id","email","name","roles","created_at","active"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyCustomDomainResponse":{"properties":{"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"type":"boolean","title":"Custom Domain Verified"},"custom_domain_cname_target":{"type":"string","title":"Custom Domain Cname Target"},"message":{"type":"string","title":"Message"}},"type":"object","required":["custom_domain","custom_domain_verified","custom_domain_cname_target","message"],"title":"VerifyCustomDomainResponse"},"VerifyEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","maxLength":32,"minLength":4,"title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyEmailRequest"}}}}