Verify the code: creates the account if it does not exist (user, organization and initial brand) and opens a session
const url = 'https://api.replifier.com/v1/auth/code/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","code":"example","name":"example","organizationName":"example","kind":"company","invitation":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/auth/code/verify \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "code": "example", "name": "example", "organizationName": "example", "kind": "company", "invitation": "example" }'Requires the __Host-repf_code cookie from the same request. name, organizationName and kind are only used when creating the account. Each code allows 5 attempts. After 10 failures per email and network in one hour (only with the cookie of a current code) you must wait 1 min, then 2, 4… up to 15 (429 code_attempts with Retry-After); it is never permanent. With invitation (token of an invitation for this same email), the new account is created without its own organization and the invitation is accepted; if the account already exists, it is just accepted. offerPasskey: the dashboard offers to create a passkey. mfaRequired: some organization requires a second factor; the code session is not enough for it.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Session created
object
object
object
Example
{ "user": { "theme": "light" }}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Too many attempts
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}