Auth
Auth routes are used to invite, register, manage, and authenticate users.
Send an invitation to register
This route allows you to invite a user to register for Arguflow vault. The user will receive an email with a link to set their password.
Required request body attributes
- Name
email
- Type
- string
- Description
The email address of the user you want to invite.
- Name
referral_tokens
- Type
- string array
- Description
The referral tokens you want to associate with the user.
Response
If the invitation is successfully sent, the response will be a 200 OK with no body.
Request
curl -X POST \
https://api.arguflow.ai/invitation \
-H 'Content-Type: application/json' \
-H 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"email": "example@example.com",
"referral_tokens": ["token1", "token2", "token3"]
}'
Register a user
This route allows a user to set their password after receiving an invitation email.
Required request body attributes
- Name
password
- Type
- string
- Description
The password the user wants to set. Must be at least 8 characters.
- Name
password_confirmation
- Type
- string
- Description
The password confirmation. Must match the password.
Response
If the user is successfully registered, a SlimUser type will be returned with the following properties:
- Name
id
- Type
- string
- Description
The user id (UUID).
- Name
email
- Type
- string
- Description
The user email.
- Name
username
- Type
- string | null
- Description
The user's username.
- Name
website
- Type
- string | null
- Description
The user's website.
- Name
visible_email
- Type
- boolean
- Description
Whether the user's email is visible to other users. Must be true if username is null.
Request
curl -X POST \
https://api.arguflow.ai/register/{invitation_id} \
-H 'Content-Type: application/json' \
-H 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"password": "password",
"password_confirmation": "password"
}'
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"email": "test@test.com",
"username": null,
"website": null,
"visible_email": true
}
Login
This route allows you to authenticate a user and retrieve an access token.
Required attributes
- Name
email
- Type
- string
- Description
The user's email.
- Name
password
- Type
- string
- Description
The user's password.
Response
If the user is successfully authenticated, the response will be a 204 OK with the auth cookie set.
Request
curl --request POST \
--url https://api.arguflow.ai/api/auth \
--header 'Content-Type: application/json' \
--data '{
"email": "foobar@bar.com",
"password": "fooandbar"
}'
Logout
This route allows you to logout a user and invalidate their access token.
Response
If the user is successfully logged out, the response will be a 204 OK with the auth cookie removed.
Request
curl --request DELETE \
--url https://api.arguflow.ai/api/auth \
--header 'Content-Type: application/json'
Get your user info
This route allows you to get your user info.
Response
If the user is successfully authenticated, a SlimUser type will be returned with the following properties:
- Name
id
- Type
- string
- Description
The user id (UUID).
- Name
email
- Type
- string
- Description
The user email.
- Name
username
- Type
- string | null
- Description
The user's username.
- Name
website
- Type
- string | null
- Description
The user's website.
- Name
visible_email
- Type
- boolean
- Description
Whether the user's email is visible to other users. Must be true if username is null.
Request
curl --request GET \
--url https://api.arguflow.ai/api/auth \
--cookie 'ai-editor=your_cookie_value_here'
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"email": "foobar@bar.com",
"username": null,
"website": null,
"visible_email": true
}
Send a password reset email
This route allows you to send a password reset email to a user.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl --request GET \
--url https://api.arguflow.ai/api/password/foobar@bar.com \
--cookie 'ai-editor=your_cookie_value_here'
Reset your password
This route allows you to reset your password.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl --request POST \
--url https://api.arguflow.ai/api/password \
--header 'Content-Type: application/json' \
--data '{
"email": "foobar@bar.com",
}'