Getting started overview

This guide provides a rapid onboarding sequence for Hackerearth, focusing on establishing an account, obtaining credentials, and executing a foundational API request. Hackerearth specializes in technical hiring and assessment, offering tools for coding challenges, remote interviews, and skill evaluations. The primary objective for new users is typically to configure an assessment, invite candidates, and then review performance data. The steps outlined here apply primarily to the HackerEarth Recruit and HackerEarth Assess products, which feature API connectivity for programmatic interaction.

Before initiating API calls, users will typically interact with the Hackerearth web interface to configure core assessment parameters and understand the platform's UI flow. This initial setup establishes the context for subsequent API interactions, such as managing tests or retrieving candidate results. The overall process for integrating Hackerearth involves:

  1. Account creation and activation.
  2. Generation of API keys or tokens.
  3. Understanding the API endpoint structure and authentication methods.
  4. Making a test API request to confirm connectivity and authorization.

Users should refer to the official Hackerearth Support documentation for comprehensive details regarding specific API functionalities and parameters.

Create an account and get keys

Accessing the Hackerearth platform and its APIs requires an active account. For organizations evaluating the service, a free trial of HackerEarth Recruit is often the starting point. This trial typically provides access to the core features necessary for setting up and managing technical assessments. The process generally follows these steps:

  1. Sign up for a HackerEarth Recruit trial: Navigate to the HackerEarth pricing page and select the option to start a free trial. This usually involves providing organizational contact information and a business email address. An activation link or initial login credentials will be sent to the registered email.
  2. Complete account setup: Follow the prompts to configure your organizational profile, including details such as company name, industry, and team size. This often requires setting up an initial administrator user and password.
  3. Access the dashboard: Once activated, log into the HackerEarth dashboard. This interface is where you manage assessments, candidates, and access administrative settings.
  4. Generate API credentials: Within the dashboard, look for a section related to 'API Settings' or 'Integrations'. The exact path may vary but is typically found under 'Settings' or 'Admin' menus. Here, you can generate API keys or tokens required for authenticating your programmatic requests. Hackerearth APIs commonly use API keys or OAuth 2.0 for authorization. Ensure you understand the specific authentication method your desired API endpoint requires. For security, these keys should be treated as sensitive credentials and stored securely, not hardcoded into public repositories.
  5. Note API documentation location: While in the API settings, identify the link to the detailed Hackerearth API documentation. This resource contains information on available endpoints, request/response formats, and specific authentication flows. For example, some platforms might use specific headers like Authorization: Bearer YOUR_API_KEY, a common pattern for OAuth 2.0 token-based authentication.

It is important to secure your API keys appropriately. Best practices for API key management include using environment variables for local development and secure secrets management services in production environments to prevent unauthorized access.

Your first request

Making a successful first API request confirms that your account is correctly set up and your credentials are valid. The specific endpoint for a first request often involves a simple read operation, such as listing existing tests or retrieving user profile information. For Hackerearth, a common initial interaction might be listing available assessments or creating a new one through the API.

Assuming you have retrieved your API key (e.g., YOUR_API_KEY) from the Hackerearth dashboard, here’s an illustrative example using curl to interact with a hypothetical Hackerearth API endpoint for listing assessments. Note that the actual endpoint, parameters, and authentication might differ; always consult the official Hackerearth API documentation for precise details.

Example: Listing Assessments (Illustrative)

This example demonstrates how to use curl to make a GET request to a hypothetical endpoint that retrieves a list of technical assessments. Replace YOUR_API_KEY with your actual key.

curl -X GET \
  'https://api.hackerearth.com/v1/assessments' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Explanation of the components:

  • curl -X GET: Specifies an HTTP GET request. This is typically used to retrieve data.
  • 'https://api.hackerearth.com/v1/assessments': This is an example API endpoint. Actual Hackerearth API endpoints will be provided in their official documentation.
  • -H 'Authorization: Bearer YOUR_API_KEY': This header transmits your API key for authentication. The Bearer prefix is common for token-based authentication.
  • -H 'Content-Type: application/json': This header indicates that the request body (if any) is in JSON format, though for a GET request, it might be less critical.

Expected Response (Illustrative)

A successful response would typically return a JSON object containing an array of assessment details. An example might look like this:

{
  "status": "success",
  "assessments": [
    {
      "id": "assessment_123",
      "name": "Senior Backend Engineer Test",
      "status": "active",
      "created_at": "2026-05-20T10:00:00Z"
    },
    {
      "id": "assessment_456",
      "name": "Junior Frontend Developer Challenge",
      "status": "draft",
      "created_at": "2026-05-18T14:30:00Z"
    }
  ]
}

An unsuccessful response would typically include an HTTP status code indicating an error (e.g., 401 Unauthorized, 403 Forbidden, 404 Not Found) and a JSON error message explaining the issue.

Common next steps

After successfully making your first API call, you can explore more advanced functionalities offered by the Hackerearth API. Common next steps for users integrating Hackerearth into their hiring workflows often include:

  1. Creating and managing assessments: Programmatically define new technical assessments, including setting up coding questions, multiple-choice questions, and assigning skill tags. This allows for dynamic test generation based on job requirements.
  2. Inviting candidates: Use the API to invite candidates to specific assessments, automating the outreach process. This might involve sending email invitations or generating unique assessment links.
  3. Retrieving candidate results: Obtain detailed performance reports for candidates who have completed assessments. This data can include scores, code quality metrics, and time taken, which can then be integrated into an Applicant Tracking System (ATS).
  4. Managing webhooks: Configure webhooks to receive real-time notifications about events such as assessment completion or candidate submission. This enables event-driven automation in your hiring pipeline. For insights into securing webhooks, refer to Twilio's webhook security guide.
  5. Integrating with other systems: Connect Hackerearth data with other platforms, such as Salesforce (for CRM), Notion (for project management), or various Applicant Tracking Systems (ATS) to streamline the hiring process. Platforms like Tray.io offer Hackerearth integrations for no-code and low-code workflow automation.
  6. Exploring advanced assessment features: Investigate APIs related to live coding interviews (HackerEarth Interview) or custom question creation to tailor the assessment experience further.

Quick Reference: Getting Started Steps

Step What to do Where
1. Account Creation Register for a HackerEarth Recruit free trial. HackerEarth Pricing Page
2. Account Activation Verify email and complete organizational profile setup. Email inbox / HackerEarth dashboard
3. API Key Generation Navigate to API settings and create new credentials. HackerEarth dashboard (Settings/Admin > API Settings)
4. API Documentation Review Understand endpoints, request/response formats, and authentication. Hackerearth Support Documentation
5. First API Call Execute a simple GET request (e.g., list assessments) using your API key. Terminal (using curl) or API client

Troubleshooting the first call

Encountering issues during your first API call is common. Here are some troubleshooting steps and common problems along with potential solutions:

  • 401 Unauthorized or 403 Forbidden errors:
    • Incorrect API Key: Double-check that you are using the correct API key and that it hasn't expired or been revoked. Regenerate the key if necessary from your Hackerearth dashboard's API settings.
    • Missing/Incorrect Authorization Header: Ensure the Authorization: Bearer YOUR_API_KEY header is present and correctly formatted. Spaces or typos can cause authentication failures.
    • Insufficient Permissions: Your API key might not have the necessary permissions for the specific endpoint you are trying to access. Review the permissions assigned to your key in the Hackerearth dashboard.
  • 404 Not Found errors:
    • Incorrect Endpoint URL: Verify that the API endpoint URL is spelled correctly and matches the one specified in the Hackerearth API documentation. API URLs are case-sensitive.
    • Incorrect API Version: Ensure you are targeting the correct API version (e.g., /v1/).
  • 400 Bad Request errors:
    • Malformed Request Body/Parameters: If you are sending a POST or PUT request, ensure the JSON payload is valid and adheres to the required schema. Check for missing mandatory fields or incorrect data types.
    • Incorrect Content-Type Header: For requests with a body (e.g., POST), ensure the Content-Type header (e.g., application/json) correctly reflects the format of your request body.
  • Network Connectivity Issues:
    • Verify your internet connection and ensure no firewalls or proxies are blocking your outgoing API requests.
    • If performing requests from a server, check its network configuration and ensure it can reach external APIs.
  • Rate Limiting:
    • If you are making many requests in a short period, you might encounter rate limiting (e.g., 429 Too Many Requests). Consult the Hackerearth API documentation for specific rate limit policies and implement exponential backoff if necessary.
  • Reviewing Server Logs: If you have access to server-side logs for your integration, these can often provide more specific error messages from the Hackerearth API itself, aiding in diagnosis.