---
title: "Request a magic link for authentication"
method: POST
path: "/auth/magick-link"
tags: ["auth"]
---

# Request a magic link for authentication

`POST /auth/magick-link`

## Request

- Base URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1`
- URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1/auth/magick-link`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/docs/auth/magick-link/post.ts> (a function with typed inputs; its response is checked against the schema)

Uses Cases: 
  - Sign up a new user
  - Sign in an existing user
  - Sign in with auto sign-up a new user if not exists

## Request body

- object
  - `email` string, required

## Response `200`

Magic link sent successfully

- object
  - `status` string
  - `message` string
  - `statusCode` integer

## Other responses

- `400`: Invalid input
- `422`: Validation error
- `500`: Server error

---

[API](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger.md) - [All operations](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/llms.txt) - [OpenAPI document](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/revisions/2d1d3ed96bb9?raw)
