Skip to main content

Authenticate management operations

Creating and managing Landing Pages and Assets requires an account. Signing in returns an access token and a refresh token. Send the access token in the Authorization header as Bearer <token>. Set the API URL and token values without storing them in the repository:

Create an account

POST /auth/sign_up accepts account details inside user:
A successful signup returns 201 Created and the tokens:

Sign in

POST /auth/sign_in uses user.email and user.password:
Invalid credentials return 401 Unauthorized:

Get the authenticated account

GET /auth/me returns the identity associated with the access token:
Without a valid token, the endpoint returns 401 Unauthorized.

Refresh tokens

Send the refresh token in the body of POST /auth/refresh. The response contains a new pair of tokens; the previous refresh token is invalidated and must not be reused.
An invalid or expired token returns 401 Unauthorized with Invalid or expired refresh token.

Sign out

DELETE /auth/sign_out revokes the access token in the header and the refresh token in the body. On success, it returns 204 No Content.
Use the new token pair after a refresh and discard revoked tokens after signing out.