Verify the signup code
const url = 'https://api.emite.cr/v1/auth/signup/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"ventas@emite.cr","code":"482913"}'};
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.emite.cr/v1/auth/signup/verify \ --header 'Content-Type: application/json' \ --data '{ "email": "ventas@emite.cr", "code": "482913" }'Verifies the code emailed by POST /v1/auth/signup, creates the account together with the acceptance of the legal documents its signup carried, and returns a session token (JWT), in the body and in the X-Session-Token header. The new account belongs to no company yet, so the token carries none: create one with POST /v1/tenants. 400 INVALID_CODE for a wrong code or an email with no pending signup, 400 CODE_EXPIRED, and 429 TOO_MANY_ATTEMPTS after five attempts on the same code.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Email of the signup, the same one sent to POST /v1/auth/signup.
Example
ventas@emite.crThe 6-digit code from the verification email, valid for 15 minutes. A wrong code answers 400 INVALID_CODE and an expired one 400 CODE_EXPIRED; after five attempts, 429 TOO_MANY_ATTEMPTS until POST /v1/auth/signup/resend sends a new one.
Example
482913Responses
Section titled “Responses”The session of the new account, which carries no company yet.
object
The session token, a signed JWT: send it as Authorization: Bearer <accessToken>. It acts for the person, in the company it names when it names one (currentTenantId in GET /v1/auth/me). The same token comes in the X-Session-Token response header.
Always Bearer: the scheme to send the token with in the Authorization header.
Remaining life of this token: whole seconds followed by s ("28800s" = 8 hours). It never reaches past the maximum of the session, which counts from the sign-in, so a re-issued token (switching company, renewing) lives less. Under a company inactivity rule it also ends that many minutes after it was issued, unless it is renewed with POST /v1/auth/sessions/renew.
The instant this token expires (ISO 8601, UTC): expiresIn as a date.
Present, and true, only in the answer of POST /v1/auth/login, when the password that just signed in does not meet the rule a new password must meet today (12 to 72 characters, nothing of the person, hard to guess: see POST /v1/auth/signup). A suggestion to change it, never a refusal: the sign-in went through.
Example
{ "tokenType": "Bearer", "expiresIn": "28800s", "expiresAt": "2026-10-22T22:30:00.000Z", "passwordChangeSuggested": true}