Skip to main content
POST
/
auth
/
register
Register a new user
curl --request POST \
  --url https://psn-api.paystub.dev/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "[email protected]",
  "password": "password123",
  "password_confirmation": "password123"
}
'
{
  "success": true,
  "data": {
    "user": {
      "id": 1,
      "site_id": 1,
      "role_id": 2,
      "first_name": "John",
      "last_name": "Doe",
      "email": "[email protected]",
      "klaviyo_id": "<string>",
      "slack_id": "<string>",
      "email_verified_at": "2023-11-07T05:31:56Z",
      "total_spent": 1250.5,
      "metadata": {},
      "settings": {},
      "status": "Active",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "site": {
        "id": 123,
        "identifier": "<string>",
        "name": "<string>",
        "logo": "<string>",
        "payment_processors": [
          "Stripe"
        ],
        "document_types": [
          "Paystub"
        ],
        "status": "active",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      },
      "role": {
        "id": 123,
        "name": "Owner",
        "description": "<string>",
        "permissions": [
          "<string>"
        ],
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      },
      "meta": {
        "is_verified": true,
        "permissions": [
          "<string>"
        ]
      }
    },
    "token": "<string>"
  },
  "message": "User registered successfully"
}

Body

application/json
first_name
string
required
Maximum length: 255
Example:

"John"

last_name
string
required
Maximum length: 255
Example:

"Doe"

email
string<email>
required
Maximum length: 255
password
string<password>
required
Minimum length: 8
Example:

"password123"

password_confirmation
string
required
Example:

"password123"

Response

User successfully registered

success
boolean
Example:

true

data
object
message
string
Example:

"User registered successfully"