auth.register
post/v1/auth/register
auth.register
Request
Body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255
},
"email": {
"type": "string",
"format": "email"
},
"password": {
"type": "string",
"minLength": 8
},
"company": {
"type": [
"string",
"null"
],
"maxLength": 255
},
"timezone": {
"type": [
"string",
"null"
]
},
"password_confirmation": {
"type": "string",
"minLength": 8
}
},
"required": [
"name",
"email",
"password",
"password_confirmation"
],
"title": "RegisterRequest"
}
}
}
}Responses
201No description
- Schema
Schema Structure
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"company": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": "string"
},
"credits": {
"type": "number"
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [
"user"
]
}
]
},
"plan": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [
"trial"
]
}
]
},
"created_at": {
"type": "string"
},
"last_login_at": {
"type": "string"
}
},
"required": [
"id",
"name",
"email",
"company",
"timezone",
"credits",
"role",
"plan",
"created_at",
"last_login_at"
]
},
"api_key": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"is_primary": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"key",
"name",
"is_primary",
"created_at"
]
},
"session": {
"type": "object",
"properties": {
"remember": {
"type": "boolean"
},
"expires_at": {
"type": "string"
}
},
"required": [
"remember",
"expires_at"
]
},
"subscription": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"enum": [
"trial"
]
},
"credits": {
"type": "integer",
"enum": [
100
]
},
"expires_at": {
"type": "string"
}
},
"required": [
"plan",
"credits",
"expires_at"
]
}
},
"required": [
"user",
"api_key",
"session",
"subscription"
]
}
},
"required": [
"success",
"data"
]
}
422Validation error
- Schema
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Errors overview."
},
"errors": {
"type": "object",
"description": "A detailed description of each field that failed validation.",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"message",
"errors"
]
}