{"id":21639866,"url":"https://github.com/mbparvezme/laravel-auth-api","last_synced_at":"2026-05-18T08:31:35.287Z","repository":{"id":157721664,"uuid":"490280516","full_name":"mbparvezme/laravel-auth-api","owner":"mbparvezme","description":"Ready APIs for Auth, verification, password reset, API key management and more.","archived":false,"fork":false,"pushed_at":"2026-03-04T23:37:18.000Z","size":468,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-05T04:57:43.747Z","etag":null,"topics":["api","authentication","laravel","laravel-api-boilerplate","laravel-auth","laravel-framework","php","php-framework"],"latest_commit_sha":null,"homepage":"https://www.mbparvez.me","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbparvezme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-09T12:48:54.000Z","updated_at":"2026-03-04T23:37:22.000Z","dependencies_parsed_at":"2023-11-10T16:30:17.842Z","dependency_job_id":"267a4508-aef8-4d3c-9dc5-035f2bf99119","html_url":"https://github.com/mbparvezme/laravel-auth-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mbparvezme/laravel-auth-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbparvezme%2Flaravel-auth-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbparvezme%2Flaravel-auth-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbparvezme%2Flaravel-auth-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbparvezme%2Flaravel-auth-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbparvezme","download_url":"https://codeload.github.com/mbparvezme/laravel-auth-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbparvezme%2Flaravel-auth-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33170827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","authentication","laravel","laravel-api-boilerplate","laravel-auth","laravel-framework","php","php-framework"],"created_at":"2024-11-25T04:15:30.118Z","updated_at":"2026-05-18T08:31:35.281Z","avatar_url":"https://github.com/mbparvezme.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eLaravel API Endpoints\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eReady APIs for Auth, verification, password reset, API key management and more!\u003c/h1\u003e\n\n\u003cbr\u003e\n\n## About This Package\n\n**Laravel API Endpoints** is a powerful starter kit built on [Laravel Sanctum](https://laravel.com/docs/12.x/sanctum), providing ready-to-use authentication, account management, and API key features for any Laravel-based application.\nIt’s designed to integrate seamlessly with the [sveltekit-dashboard-starter](https://github.com/theui-dev/sveltekit-dashboard-starter), offering a smooth full-stack experience.\n\n\n\u003cbr\u003e\n\n## Features\nThis package encompasses a range of features, including but not limited to:\n\n- User registration via email and password.\n- Email verification (including re-verification for new email updates).\n- Secure login.\n- Password reset using email-based token.\n- Multi-device authentication support.\n- Generate, regenerate, and revoke API keys.\n- Profile management (update email, change password, manage account status).\n- Active device tracking and logout from all devices.\n- RESTful responses with localization support.\n- Throttle protection and API key middleware for security.\n\n\u003cbr\u003e\n\n## API Endpoints\nIt includes the following endpoints:\n\n\u003ch3 style=\"font-weight:bold;color:#2299ee\" colspan=3\u003e↪ Public routes\u003c/h3\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eDetails\u003c/th\u003e\n    \u003cth\u003eMethod\u003c/th\u003e\n    \u003cth\u003eAPI End Points\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRegistration\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/register\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eLogin\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/login\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eEmail verification \u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e/api/verify-email/{id}/{hash}\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eVerify new email \u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e/api/verify-new-email\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRequest password reset\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/password/forgot\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eReset password\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/password/reset/{token}\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n\u003ch3 style=\"font-weight:bold;color:#2299ee\" colspan=3\u003e↪ Authenticated routes\u003c/h3\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eDetails\u003c/th\u003e\n    \u003cth\u003eMethod\u003c/th\u003e\n    \u003cth\u003eAPI End Points\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eResend email verification link\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/resend-verification-email\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eLogout\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/logout\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eLogout from all device\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/logout-all\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDashboard\u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e/api/dashboard\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eActive devices\u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e/api/active-device\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd style=\"font-weight:bold;color:#22bb99\" colspan=3\u003e↪ API Key Management\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eList API keys\u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e/api/keys\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCreate API key\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/keys\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRegenerate API key\u003c/td\u003e\n    \u003ctd\u003ePATCH\u003c/td\u003e\n    \u003ctd\u003e/api/keys/{id}\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDelete API key\u003c/td\u003e\n    \u003ctd\u003eDELETE\u003c/td\u003e\n    \u003ctd\u003e/api/keys/{id}\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd style=\"font-weight:bold;color:#22bb99\" colspan=3\u003e↪ Account Management\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eGet profile\u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e/api/account\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eUpdate email\u003c/td\u003e\n    \u003ctd\u003ePATCH\u003c/td\u003e\n    \u003ctd\u003e/api/account/email\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eUpdate password\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e/api/account/password\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eUpdate account status\u003c/td\u003e\n    \u003ctd\u003ePATCH\u003c/td\u003e\n    \u003ctd\u003e/api/account/{status}\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003cbr\u003e\n\n## API Documentation\n\n- All endpoints are prefixed with `/api`.\n- All endpoints requires the following request headers:\n    ```json\n    {\n      \"Content-Type\": \"application/json\",\n      \"Accept\": \"application/json\"\n    }\n    ```\n- All authenticated endpoints require a valid Sanctum API token in the `Authorization` header.\n\n    ```sh\n    Authorization: Bearer \u003cSANCTUM_TOKEN\u003e\n    ```\n\u003cbr\u003e\n\n### ↪ Public Routes\nThese endpoints are accessible without authentication and are subject to a strict rate limit.\n\n#### 1. User Registration\nCreates a new user account and sends an email verification link.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/register`\n\n**Request Body**\n```json\n{\n  \"name\": \"John Doe\",\n  \"email\": \"user@example.com\",\n  \"password\": \"password123\",\n  \"password_confirmation\": \"password123\"\n}\n```\n\n**Response (201 Created)**\n```js\n{\n  \"success\": true,\n  \"message\": \"Account created successfully! Please check your email to verify your account.\",\n\t\"data\": {\n\t\t\"user\": {\n\t\t\t\"id\": 2,\n\t\t\t\"name\": \"John Doe\",\n\t\t\t\"email\": \"user@example.com\",\n\t\t\t\"profile\": null\n\t\t},\n\t\t\"token\": \"1|lAdHhXEP5iQfh0v29DnEqVwbWzfolFGdU6dnP3rB52fe74a7\"\n\t},\n  \"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 2. User Login\nAuthenticates a user and returns a Sanctum API token.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/login`\n\n**Request Body**\n```json\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"password123\"\n}\n```\n\n**Response (200 OK)**\n```js\n{\n\t\"success\": true,\n\t\"message\": \"Login successful!\",\n\t\"data\": {\n\t\t\"user\": {\n\t\t\t\"id\": 2,\n\t\t\t\"name\": \"John Doe\",\n\t\t\t\"email\": \"user@example.com\",\n\t\t\t\"profile\": {\n\t\t\t\t\"profile_picture\": \"profiles/default.png\",\n\t\t\t\t\"mobile\": \"+8801712345678\",\n\t\t\t\t\"address\": \"House 123, Road 4, Dhaka, Bangladesh\",\n\t\t\t\t\"dob\": \"1990-01-01\",\n\t\t\t\t\"gender\": \"male\",\n\t\t\t\t\"bio\": \"This is a sample bio for user 1.\"\n\t\t\t}\n\t\t},\n\t\t\"token\": \"1|lAdHhXEP5iQfh0v29DnEqVwbWzfolFGdU6dnP3rB52fe74a7\"\n\t},\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 3. Verify Email Address\nVerifies the user's email address using the ID and hash from the verification link.\n\n**Method**: `GET`\n\n**Endpoint**: `/api/verify-email/{id}/{hash}`\n\n\u003e URL structure: `/api/verify-email/2/\u003cHASH\u003e?expires=\u003cTIMESTAMP\u003e\u0026signature=\u003cENCRYPTED\u003e`\n\n**Response (200 OK)**\n```js\n{\n  \"success\": true,\n  \"message\": \"Your email has been successfully verified!\",\n  \"data\": null,\n  \"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 4. Verify New Email Address (After updating email)\nThis endpoint verifies user's new email address whenever user updates/change their user email using the ID and hash from the verification link.\n\n**Method**: `GET`\n\n**Endpoint**: `/api/verify-new-email`\n\n\u003e URL structure: `/api/verify-new-email?expires=\u003cTIMESTAMP\u003e\u0026user=\u003cUSER ID\u003e\u0026signature=\u003cENCRYPTED\u003e`\n\n**Response (200 OK)**\n```js\n{\n\"success\": true,\n\"message\": \"Email verified and updated successfully.\",\n\"data\": null,\n\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 5. Request Password Reset\nSends a password reset link to the user's email address.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/password/forgot`\n\n**Request Body**\n```json\n{\n  \"email\": \"user@example.com\"\n}\n```\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"A password reset link has been sent to your email address.\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 6. Reset Password\nSets a new password using the token from the password reset email.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/password/reset/{token}`\n\n**Request Body**\n```json\n{\n\t\"email\" : \"test@example.com\",\n  \"password\": \"password2\",\n  \"password_confirmation\": \"password2\",\n\t\"token\": \"\u003cTOKEN FROM THE URL\u003e\"\n}\n```\n\n**Response (200 OK)**\n```json\n{\n    \"success\": true,\n    \"message\": \"Password updated successfully! You can now log in with your new password.\",\n    \"data\": null,\n    \"errors\": []\n\n}\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### ↪ Authenticated Routes\nBelow are the authenticated routes requires a valid Sanctum API token in the `Authorization` header.\n\n```\nAuthorization: Bearer \u003cSANCTUM_TOKEN\u003e\n```\n\n\u003cbr\u003e\n\n#### 1. Resend Verification Email\nSends a new email verification link to the authenticated user.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/resend-verification-email`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"An email verification link has been sent to your inbox. Please check your email and follow the instructions to complete the verification process.\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 2. Logout\nRevokes the token that was used to authenticate the current request.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/logout`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"Logged out successfully!\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 3. Logout From All Devices\nRevokes all tokens associated with the authenticated user.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/logout-all`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"Logged out successfully from all devices!\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 4. Get Active Devices\nLists all active sessions/tokens for the current user.\n\n**Method**: `GET`\n\n**Endpoint**: `/api/active-device`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"Active devices!\",\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 1,\n\t\t\t\"name\": \"Web API\",\n\t\t\t\"attributes\": {\n\t\t\t\t\"mac\": \"XX-XX-XX-XX-XX-XX   Media disconnected\",\n\t\t\t\t\"browser\": false,\n\t\t\t\t\"platform\": false,\n\t\t\t\t\"ip_address\": \"127.0.0.1\",\n\t\t\t\t\"device_name\": \"Desktop\"\n\t\t\t},\n\t\t\t\"last_used_at\": \"2025-10-08T06:00:22.000000Z\",\n\t\t\t\"created_at\": \"2025-10-08T05:34:44.000000Z\"\n\t\t}\n\t],\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### ↪ Account Management\nThese endpoints require the user to be authenticated and email-verified.\n\n#### 1. Get User Profile\nRetrieves the profile information of the authenticated user.\n\n**Method**: `GET`\n\n**Endpoint**: `/api/account`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"User profile details!\",\n\t\"data\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Test User\",\n\t\t\"email\": \"test@example.com\",\n\t\t\"profile\": {\n\t\t\t\"profile_picture\": \"profiles/default.png\",\n\t\t\t\"mobile\": \"+8801712345678\",\n\t\t\t\"address\": \"House 123, Road 4, Dhaka, Bangladesh\",\n\t\t\t\"dob\": \"1990-01-01\",\n\t\t\t\"gender\": \"male\",\n\t\t\t\"bio\": \"This is a sample bio for user 1.\",\n      \"other_profile_info\": \"data..\"\n\t\t}\n\t},\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 2. Update Email Address\nUpdates the user's email address. A new verification link will be sent to the new email.\n\n**Method**: `PATCH`\n\n**Endpoint**: `/api/account/email`\n\n**Request Body**\n```json\n{\n  \"email\": \"new.email@example.com\",\n  \"password\": \"password123\"\n}\n```\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"Email updated. Please check your new inbox to verify the address.\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 3. Update Password\nUpdates the user's password.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/account/password`\n\n**Request Body**\n```json\n{\n    \"current_password\": \"password\",\n    \"new_password\": \"newStrongPassword456\",\n    \"new_password_confirmation\": \"newStrongPassword456\"\n}\n```\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"Your password has been updated successfully.\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 4. Inactive/Reactivate/Suspend Account\nChanges the user's account status.\n\n**Method**: `PATCH`\n\n**Endpoint**: `/api/account/{status}`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"Account inactivated successfully!\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\u003e *Message will be displayed based on the status*\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### ↪ API Key Management\nEndpoints for managing user-generated API keys.\n\n#### 1. Create API Key\nCreates a new API key.\n\u003e Important: The `plain_text_token` is only returned once upon creation. Store it securely.\n\n**Method**: `POST`\n\n**Endpoint**: `/api/keys`\n\n**Request**\n```json\n{\n  \"name\": \"Website API\"\n}\n```\n\n**Response (201 Created)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"API key created successfully. Store this token securely as it will not be shown again.\",\n\t\"data\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Website API\",\n\t\t\"key\": \"9QYu1EUfFDhRHUG2B8Ac3FtvxqXHAsDr\",\n\t\t\"secret\": \"hPNjZskLfkqGt1uvute2mV9Td1ymjRhsmwYze3zvZGY3xm5t8f50q7X3nsEKSWQc\",\n\t\t\"expires_at\": \"2026-01-09T21:24:48.000000Z\"\n\t},\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 2. List API Keys\nRetrieves all API keys belonging to the user.\n\n**Method**: `GET`\n\n**Endpoint**: `/api/keys`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"All API keys of the user!\",\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 1,\n\t\t\t\"name\": \"Website API\",\n\t\t\t\"key\": \"aBUaIu0g6vYSk8SKU96v3nCmSioLEVLb\",\n\t\t\t\"expires_at\": \"2026-01-10T05:43:31.000000Z\",\n\t\t\t\"created_at\": \"2025-10-12T05:43:31.000000Z\"\n\t\t},\n\t\t{\n\t\t\t\"id\": 2,\n\t\t\t\"name\": \"Mobile APP\",\n\t\t\t\"key\": \"SKUnCmSiu96oLEVLbaBUaIv30g6vYSk8\",\n\t\t\t\"expires_at\": \"2026-01-10T05:43:42.000000Z\",\n\t\t\t\"created_at\": \"2025-10-12T05:43:42.000000Z\"\n\t\t}\n\t],\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 3. Regenerate API Key\nGenerates a new token for an existing API key.\n\n**Method**: `PATCH`\n\n**Endpoint**: `/api/keys/{id}`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"API key regenerated successfully!\",\n\t\"data\": {\n\t\t\"key\": \"hRHUG2B8AsDc3F9QYutvxqXHAr1EUfFD\",\n\t\t\"secret\": \"gqLskXhXjcpBT3aIPu8y6GbmlKsuJiONNoW03SlU6ByIbP489VOFzbIogGe3WUm7\",\n\t\t\"abilities\": null\n\t},\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n#### 4. Delete API Key\nDeletes an API key.\n\n**Method**: `DELETE`\n\n**Endpoint**: `/api/keys/{id}`\n\n**Response (200 OK)**\n```json\n{\n\t\"success\": true,\n\t\"message\": \"API key revoked successfully!\",\n\t\"data\": null,\n\t\"errors\": []\n}\n```\n\n\u003cbr\u003e\n\n## Copyright and license\n\nCode and documentation copyright 2022 the [M B Parvez](https://www.mbparvez.me) and [Gosoft](https://www.gosoft.io). Code released under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbparvezme%2Flaravel-auth-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbparvezme%2Flaravel-auth-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbparvezme%2Flaravel-auth-api/lists"}