Skip to content

Send an email sign-in or sign-up code

POST
/auth/email-otp/send-verification-otp
curl --request POST \
--url https://api.voidfs.com/auth/email-otp/send-verification-otp \
--header 'Content-Type: application/json' \
--data '{ "type": "sign-in", "email": "example" }'

This operation uses Better Auth’s contract. Better Auth failures use code and message; the Worker returns problem details for its own refusals.

Media typeapplication/json
object
type
required
string
Allowed values: sign-in
email
required
string

Code dispatch accepted.

Media typeapplication/json
object
success
required
boolean

Example

{
"success": true
}

Invalid request. Conflicting credentials. Better Auth refused the request.

object
code
required
string
message
required
string

Example generated

{
"code": "example",
"message": "example"
}

Connected-app credential unavailable.

Media typeapplication/problem+json
ProblemDetails
object
type
required

Problem type URI

string
status
required

HTTP status code

integer
title
required

Short summary of the problem type

string
detail

Human-readable explanation

string
instance
required
string
error
required
string
category
required
string
Allowed values: invalid-input unauthorized forbidden not-found conflict rate-limited unavailable

Examples

Exampleconnected-app-unavailable
{
"type": "https://docs.voidfs.com/errors/#connected-app-unavailable",
"title": "Connected-app credential unavailable",
"status": 401,
"instance": "urn:uuid:4bf92f35-77b3-4da6-a3ce-929d0e0e4736",
"error": "connected-app-unavailable",
"category": "unauthorized"
}
WWW-Authenticate
string

Origin not allowed. Not allowed. Better Auth refused the request.

object
code
required
string
message
required
string

Example generated

{
"code": "example",
"message": "example"
}

Not found.

Media typeapplication/problem+json
ProblemDetails
object
type
required

Problem type URI

string
status
required

HTTP status code

integer
title
required

Short summary of the problem type

string
detail

Human-readable explanation

string
instance
required
string
error
required
string
category
required
string
Allowed values: invalid-input unauthorized forbidden not-found conflict rate-limited unavailable

Examples

Examplenot-found
{
"type": "https://docs.voidfs.com/errors/#not-found",
"title": "Not found",
"status": 404,
"instance": "urn:uuid:4bf92f35-77b3-4da6-a3ce-929d0e0e4736",
"error": "not-found",
"category": "not-found"
}

Method not allowed.

Media typeapplication/problem+json
ProblemDetails
object
type
required

Problem type URI

string
status
required

HTTP status code

integer
title
required

Short summary of the problem type

string
detail

Human-readable explanation

string
instance
required
string
error
required
string
category
required
string
Allowed values: invalid-input unauthorized forbidden not-found conflict rate-limited unavailable

Examples

Examplemethod-not-allowed
{
"type": "https://docs.voidfs.com/errors/#method-not-allowed",
"title": "Method not allowed",
"status": 405,
"instance": "urn:uuid:4bf92f35-77b3-4da6-a3ce-929d0e0e4736",
"error": "method-not-allowed",
"category": "invalid-input"
}
Allow
string

Unsupported media type.

Media typeapplication/problem+json
ProblemDetails
object
type
required

Problem type URI

string
status
required

HTTP status code

integer
title
required

Short summary of the problem type

string
detail

Human-readable explanation

string
instance
required
string
error
required
string
category
required
string
Allowed values: invalid-input unauthorized forbidden not-found conflict rate-limited unavailable

Examples

Exampleunsupported-media-type
{
"type": "https://docs.voidfs.com/errors/#unsupported-media-type",
"title": "Unsupported media type",
"status": 415,
"instance": "urn:uuid:4bf92f35-77b3-4da6-a3ce-929d0e0e4736",
"error": "unsupported-media-type",
"category": "invalid-input"
}

Rate limit exceeded. Better Auth refused the request.

object
code
required
string
message
required
string

Example generated

{
"code": "example",
"message": "example"
}
Retry-After
integer
>= 1

Seconds before retrying when storage is under pressure.

Sign-ups paused. Unavailable.

Media typeapplication/problem+json
ProblemDetails
object
type
required

Problem type URI

string
status
required

HTTP status code

integer
title
required

Short summary of the problem type

string
detail

Human-readable explanation

string
instance
required
string
error
required
string
category
required
string
Allowed values: invalid-input unauthorized forbidden not-found conflict rate-limited unavailable

Examples

{
"type": "https://docs.voidfs.com/errors/#paused",
"title": "Sign-ups paused",
"status": 503,
"instance": "urn:uuid:4bf92f35-77b3-4da6-a3ce-929d0e0e4736",
"error": "paused",
"category": "unavailable"
}