Skip to main content
POST
/
api
/
v1
/
auth
/
register
Register a new user
curl --request POST \
  --url http://localhost:7701/api/v1/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "secret123",
  "password_confirmation": "secret123",
  "company_name": "Acme Corp",
  "company_cnpj": "12345678000190",
  "company_financial_email": "fin@empresa.com",
  "company_phone": "11900000000"
}
'
{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
  "token_type": "Bearer",
  "expires_at": "2026-05-27T12:00:00+00:00",
  "user": {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "company_id": 1
  },
  "company": {
    "name": "Acme Corp",
    "client_id": "client_a1b2c3d4e5f6g7h8",
    "api_key": "sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
    "warning": "Save your api_key safely, it won't be shown again."
  }
}

Body

application/json
name
string
required
Example:

"John Doe"

email
string<email>
required
Example:

"john@example.com"

password
string<password>
required
Minimum string length: 8
Example:

"secret123"

password_confirmation
string<password>
required
Example:

"secret123"

company_name
string
required
Example:

"Acme Corp"

company_cnpj
string | null
Example:

"12345678000190"

company_financial_email
string | null
Example:

"fin@empresa.com"

company_phone
string | null
Example:

"11900000000"

Response

User and company created — JWT token returned

token
string
Example:

"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."

token_type
string
Example:

"Bearer"

expires_at
string<date-time>
Example:

"2026-05-27T12:00:00+00:00"

user
object
company
object