Talkstack
  • System architecture
  • Getting Started With Talkstack's API
  • Authentication
    • Signup
    • Verify Email
    • Resend email verification code
    • Login
    • Refresh Token
    • Change Password
    • Forgot Password
    • Reset Password
  • User
    • Generate API key
    • Set active Project
    • Get active Project
  • Project
    • Creating a new project
    • Get Project
    • Getting list of projects
    • Update a project
    • Delete Project
    • Webhook
    • Get Active Agent
    • Set Active Agent
    • Remove Active Agent
  • Agent
    • Create a new Agent
    • Get Agent Details
    • Update Agent
    • Delete an agent
    • Get All agents
  • Call
    • Make phone call
    • Get call data
    • Get call history
    • Get call analysis
    • Batch calls
  • Voices
    • List Voices
    • Get Voice data
  • Phone Number
    • Get phone number data
    • Assign Number to Agent
  • Hubspot
    • HubSpot Integration
Powered by GitBook
On this page
  1. Authentication

Verify Email

This section provides instructions on using /auth/verify-email endpoint to use for verifying user after signup.

Step 1: Prepare Your Request

  • Endpoint: /auth/verify-email

  • Method: POST

  • URL: https://api.talkstackai.com/auth/verify-email

  • Headers: Include Content-Type: application/json.

Step 2: Create the Request Body

  • email: Email of the user.

  • code : The code sent to the email entered.

Example Request Body:

{
    "email": "example@host.com",
    "code": "xxxxxx"
}

Step 3: Send the Request

Use your preferred HTTP client to send the POST request with the JSON body.

Step 4: Handle the response

Success Response:

  • Status Code: 200 OK

  • userData: It is the data about the user.

  • verificationStatus: The verification statuses are based on this enum:

export const EMAIL_VERIFICATION_STATUS = {
    'CREDENTIALS_MISSING': 0,
    'INVALID_CODE': 1,
    'SUCCESS': 2,
    'RESEND_INVITE': 3,
    'ACCOUNT_EXISTS': 4,
    'ACCOUNT_NOT_FOUND': 5
}

Response Body

{
    "message": "email verification successful.",
    "status": "success",
    "userData": {
        "email": "example@host.com",
        "name": "John",
        "active_project": null,
        "created_at": "2025-03-11T06:50:31.798Z",
        "updated_at": "2025-03-11T06:52:07.501Z"
    },
    "verificationStatus": 2
}

Troubleshooting

  • 400 Bad Request: Bad request is only thrown if one of the scenarios occur: - email or code missing in request body. - email is invalid. - A verified account already exists with this email.

  • 404 Not Found: Is the email has not been registered for verification.

  • 500 Internal Server Error: For errors in email verification.

Last updated 17 hours ago

PreviousSignupNextResend email verification code

Last updated 2 months ago