Skip to main content

Prerequisites

Before you begin, make sure you have:
  • An active Mindhunters workspace account
  • Access to your workspace dashboard
  • Admin or developer permissions to create API tokens

Getting Your API Token

Follow these steps to generate your API authentication token:
1

Log in to your Mindhunters workspace

Navigate to your Mindhunters workspace at https://your-tenant.mindhunters.ai and sign in with your credentials.
2

Access your profile

Click on your profile icon in the top right corner of the dashboard.
3

Navigate to Developer section

From the dropdown menu, select “Developer” to access the developer settings.
4

Create a new API token

In the Developer section:
  • Click on “Create New API Token” or “Generate Token”
  • Give your token a descriptive name (e.g., “Production API”, “Development Testing”)
  • Set appropriate permissions if prompted
  • Click “Create” or “Generate”
5

Copy and secure your token

Important: Copy your API token immediately and store it securely. For security reasons, you won’t be able to see it again after closing the dialog.Store your token in a secure location such as:
  • Environment variables
  • Secure credential management systems
  • Password managers (for development)
Never share your API token or commit it to version control systems. Treat it like a password. If you suspect your token has been compromised, revoke it immediately and generate a new one.

Understanding Your Tenant/Subdomain

Your Mindhunters workspace URL contains your tenant identifier (also called subdomain), which is required for all API calls.

How to Find Your Tenant

Your tenant is the subdomain in your Mindhunters workspace URL:
https://abc.mindhunters.ai
         ^^^
      This is your tenant
If your workspace URL is https://abc.mindhunters.ai, then your tenant is abc.

Using Your Tenant in API Calls

All API endpoints use your tenant in the base URL:
https://{your-tenant}.mindhunters.ai/api/v1/...
Example:
https://abc.mindhunters.ai/api/v1/calls

Authentication Format

Mindhunters API uses Bearer Token Authentication. Include your API token in the Authorization header of every request:
Authorization: Bearer YOUR_API_TOKEN

Example Authentication Headers

curl -X GET https://abc.mindhunters.ai/api/v1/calls \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Security Best Practices

  • Use environment variables for API tokens
  • Never hardcode tokens in your source code
  • Use secure credential management systems in production
  • Rotate tokens periodically
All API requests must use HTTPS. HTTP requests will be rejected. The Mindhunters API enforces TLS 1.2 or higher.
  • Create multiple tokens for different services
  • Rotate tokens regularly (every 90 days recommended)
  • Have a process to quickly rotate compromised tokens
  • Create separate tokens for different environments (development, staging, production)
  • Use descriptive names to track token usage
  • Revoke unused tokens immediately
  • Regularly review API logs for unusual activity
  • Set up alerts for failed authentication attempts
  • Monitor token usage in the Developer section of your dashboard

Token Management

Viewing Active Tokens

You can view all active API tokens in the Developer section of your workspace:
  1. Go to your profile → Developer
  2. View the list of active tokens
  3. See token creation date and last used timestamp

Revoking Tokens

If you need to revoke a token:
  1. Navigate to Developer section
  2. Find the token in your list
  3. Click “Revoke” or the delete icon
  4. Confirm the revocation
Revoking a token immediately invalidates it. Any applications using that token will no longer be able to authenticate.

Creating Multiple Tokens

You can create multiple tokens for different purposes:
  • Development: For local testing and development
  • Staging: For staging environment deployments
  • Production: For production applications
  • CI/CD: For automated deployment pipelines

Authentication Errors

Common authentication errors and how to resolve them:
Status CodeErrorSolution
401UnauthorizedVerify your token is correct and hasn’t been revoked
401Missing Authorization headerInclude the Authorization: Bearer YOUR_TOKEN header
401Invalid token formatEnsure you’re using Bearer YOUR_TOKEN format
403ForbiddenCheck that your token has the necessary permissions
404Not FoundVerify your tenant/subdomain in the base URL is correct

Testing Your Authentication

You can test your authentication by making a simple API call:
curl -X GET https://your-tenant.mindhunters.ai/api/v1/calls \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Next Steps

Now that you have your API token and understand authentication: