Overview
POST/auth/registerauth

Create an account (email + password)

Create a record in register.

Request body

application/json · optional

  • emailstring
  • passwordstring
  • namestring
Example
{
  "email": "string",
  "password": "string",
  "name": "string"
}
Responses
201

token + refreshToken + user

  • tokenstring

    JWT access token (Bearer credential)

  • refreshTokenstring

    Opaque refresh token (rotated on use)

  • userUser
  • emailVerificationRequiredboolean
  • emailInUseoptionalboolean
Example
{
  "token": "string",
  "refreshToken": "string",
  "user": {
    "id": "string",
    "email": "string",
    "name": "string",
    "avatarUrl": "string",
    "slug": "string",
    "publicProfileEnabled": true,
    "capabilities": [
      "string"
    ]
  },
  "emailVerificationRequired": true,
  "emailInUse": true
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
403

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
409

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/auth/register" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "string",
  "password": "string",
  "name": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/auth/register", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"email\": \"string\",\n  \"password\": \"string\",\n  \"name\": \"string\"\n}",
});
const data = await res.json();