API Documentation
Integrate namepick.co services into your applications with our comprehensive API
Getting Started
Learn how to authenticate and make your first API request
Base URL
https://namepick.co/api
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Rate Limiting
API rate limits vary by plan:
- Starter: 1,000 requests/hour
- Professional: 10,000 requests/hour
- Enterprise: Unlimited
Rate limit information is included in response headers:
X-RateLimit-Limit
: Maximum requests per hourX-RateLimit-Remaining
: Remaining requestsX-RateLimit-Reset
: Time when limit resets
Domain Management
POST
/api/domains/check
Check domain availability and pricing
Parameters
domain
string* - Domain name to check (e.g., "example.com")Example Request
{
"domain": "example.com"
}
Example Response
{
"domain": "example.com",
"available": true,
"price": 9.99,
"currency": "GBP",
"premium": false,
"extension": ".com"
}
POST
/api/domains/register
Register a new domain
Parameters
domain
string* - Domain name to registeryears
number - Registration period (1-10 years, default: 1)nameservers
array - Custom nameservers (optional)Example Request
{
"domain": "example.com",
"years": 1,
"nameservers": [
"ns1.namepick.co",
"ns2.namepick.co"
]
}
Example Response
{
"success": true,
"domain": "example.com",
"status": "registered",
"expiryDate": "2026-01-06",
"orderId": "ORD-123456"
}
POST
/api/domains/whois
Perform WHOIS lookup
Parameters
domain
string* - Domain to lookupExample Request
{
"domain": "example.com"
}
Example Response
{
"domain": "example.com",
"available": false,
"registrar": "Example Registrar Ltd",
"createdDate": "2020-01-15",
"expiryDate": "2025-01-15",
"nameServers": ["ns1.example.com", "ns2.example.com"],
"status": ["clientTransferProhibited"]
}
DNS Management
POST
/api/domains/dns
Get DNS records for a domain
Parameters
domain
string* - Domain to check DNS recordsExample Request
{
"domain": "example.com"
}
Example Response
{
"domain": "example.com",
"records": {
"A": [{"name": "example.com", "value": "192.0.2.1", "ttl": 3600}],
"MX": [{"name": "example.com", "value": "10 mail.example.com", "ttl": 3600}],
"TXT": [{"name": "example.com", "value": "v=spf1 -all", "ttl": 3600}]
}
}
SSL Certificates
POST
/api/domains/ssl
Check SSL certificate status
Parameters
domain
string* - Domain to check SSL certificateExample Request
{
"domain": "example.com"
}
Example Response
{
"domain": "example.com",
"valid": true,
"issuer": {
"organization": "Let's Encrypt",
"commonName": "R3"
},
"validFrom": "2024-11-06T00:00:00Z",
"validTo": "2025-02-04T23:59:59Z",
"daysRemaining": 29,
"grade": "A+"
}
Reseller API
POST
/api/reseller/apply
Apply for reseller account
Parameters
companyName
string* - Company nameemail
string* - Contact emailphone
string* - Contact phone numberplan
string* - Plan type: reseller_starter, reseller_professional, or reseller_enterprisecompanyWebsite
string - Company website URLbusinessType
string - Type of businessExample Request
{
"companyName": "Web Solutions Ltd",
"email": "contact@websolutions.com",
"phone": "+44 20 1234 5678",
"plan": "reseller_professional",
"companyWebsite": "https://websolutions.com",
"businessType": "Web Design Agency"
}
Example Response
{
"success": true,
"resellerId": "RES-123456",
"status": "pending",
"message": "Application submitted successfully. We'll review it within 24 hours."
}
GET
/api/reseller/account
Get reseller account details
Parameters
Example Request
GET /api/reseller/account
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"reseller": {
"id": "RES-123456",
"companyName": "Web Solutions Ltd",
"status": "active",
"resellerType": "professional",
"accountBalance": 1234.56,
"totalRevenue": 5678.90,
"totalCommission": 890.12,
"commissionRates": {
"domain": 20,
"ssl": 25,
"email": 30
}
}
}
GET
/api/reseller/products
Get product catalog with reseller pricing
Parameters
type
string - Filter by product type: domain, ssl, emailcategory
string - Filter domains by category: generic, country, newExample Request
GET /api/reseller/products?type=domain
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"domains": [
{
"id": "domain-.com",
"name": ".com",
"basePrice": 9.99,
"resellerPrice": 7.99,
"commissionRate": 20,
"commissionAmount": 2.00
}
],
"resellerInfo": {
"type": "professional",
"commissionRates": {
"domain": 20,
"ssl": 25,
"email": 30
}
}
}
GET
/api/reseller/orders
Get reseller orders
Parameters
page
number - Page number (default: 1)limit
number - Results per page (default: 10)status
string - Filter by status: pending, processing, completed, failed, cancelledExample Request
GET /api/reseller/orders?status=completed&limit=10
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"orders": [
{
"id": "RO-ABC123DEF4",
"domainName": "example.com",
"tld": ".com",
"customerEmail": "john@example.com",
"customerName": "John Doe",
"registrationPrice": 12.99,
"costPrice": 10.39,
"commission": 2.60,
"status": "completed",
"orderDate": "2025-01-06T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 42,
"totalPages": 5
}
}
POST
/api/reseller/orders
Create a new order
Parameters
domainName
string* - Domain name without TLDtld
string* - Top-level domain (e.g., .com, .net)years
number - Registration period in years (1-10, default: 1)customerEmail
string* - Customer email addresscustomerName
string* - Customer full nameregistrationPrice
number* - Price charged to customerwhoisPrivacy
boolean - Enable WHOIS privacy (default: false)Example Request
{
"domainName": "example",
"tld": ".com",
"years": 1,
"customerEmail": "john@example.com",
"customerName": "John Doe",
"customerCompany": "Example Corp",
"registrationPrice": 12.99,
"whoisPrivacy": true,
"autoRenew": true
}
Example Response
{
"success": true,
"order": {
"id": "RO-XYZ789ABC1",
"status": "pending",
"domainName": "example.com",
"commission": 2.60,
"orderDate": "2025-01-06T14:30:00Z"
}
}
GET
/api/reseller/transactions
Get transaction history
Parameters
page
number - Page number (default: 1)limit
number - Results per page (default: 20)type
string - Filter by type: credit, debit, commission, bonus, refund, payoutstartDate
string - Start date (ISO 8601)endDate
string - End date (ISO 8601)Example Request
GET /api/reseller/transactions?type=commission&limit=5
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"transactions": [
{
"id": "RT-ABC123DEF4",
"type": "commission",
"amount": 2.60,
"balance": 1237.16,
"description": "Commission for order RO-XYZ789ABC1: example.com",
"referenceType": "order",
"referenceId": "RO-XYZ789ABC1",
"createdAt": "2025-01-06T14:35:00Z"
}
],
"summary": {
"totalCount": 150,
"totalCredits": 5678.90,
"totalDebits": 4444.34,
"totalCommission": 890.12,
"currentBalance": 1234.56
},
"pagination": {
"page": 1,
"limit": 5,
"totalPages": 30
}
}
GET
/api/reseller/payouts
Get payout information
Parameters
status
string - Filter by status: pending, processing, completed, failedExample Request
GET /api/reseller/payouts
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"summary": {
"availableBalance": 1234.56,
"pendingPayouts": 0,
"minimumPayout": 50,
"lastPayoutDate": "2024-12-15T10:00:00Z",
"totalPayouts": 5,
"totalPayoutAmount": 2500.00
},
"payouts": [
{
"id": "PO-ABC123DEF4",
"amount": 500.00,
"status": "completed",
"method": "bank_transfer",
"requestedAt": "2024-12-14T15:00:00Z",
"processedAt": "2024-12-15T10:00:00Z",
"transactionId": "TXN-12345"
}
],
"methods": [
{
"id": "bank_transfer",
"name": "Bank Transfer",
"processingTime": "2-3 business days",
"minimumAmount": 50
},
{
"id": "paypal",
"name": "PayPal",
"processingTime": "Instant",
"minimumAmount": 25
}
]
}
POST
/api/reseller/payouts
Request a payout
Parameters
amount
number* - Payout amountmethod
string* - Payout method: bank_transfer, paypal, stripeaccountDetails
object* - Account details based on payout methodExample Request
{
"amount": 500.00,
"method": "bank_transfer",
"accountDetails": {
"accountName": "Web Solutions Ltd",
"accountNumber": "12345678",
"sortCode": "12-34-56"
}
}
Example Response
{
"success": true,
"payout": {
"id": "PO-XYZ789ABC1",
"amount": 500.00,
"status": "pending",
"method": "bank_transfer",
"requestedAt": "2025-01-06T15:00:00Z"
},
"message": "Payout request submitted successfully"
}
GET
/api/reseller/api-keys
Manage API keys
Parameters
Example Request
GET /api/reseller/api-keys
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"apiKeys": [
{
"id": "key_ABC123",
"name": "Production API Key",
"scopes": ["orders:read", "orders:write", "products:read"],
"lastUsedAt": "2025-01-06T12:00:00Z",
"createdAt": "2024-12-01T10:00:00Z"
}
],
"scopes": [
{
"scope": "orders:read",
"description": "View order details and history"
},
{
"scope": "orders:write",
"description": "Create and manage orders"
}
],
"usage": {
"last30Days": {
"totalRequests": 1523,
"successfulRequests": 1520,
"failedRequests": 3,
"averageResponseTime": 125
}
}
}
POST
/api/reseller/api-keys
Create new API key
Parameters
name
string* - API key namescopes
array* - Array of permission scopesexpiresIn
number - Expiration in days (default: 30)Example Request
{
"name": "Production API Key",
"scopes": ["orders:read", "orders:write", "products:read", "transactions:read"],
"expiresIn": 365
}
Example Response
{
"success": true,
"apiKey": {
"id": "key_XYZ789",
"name": "Production API Key",
"token": "rk_live_1234567890abcdefghijklmnopqrstuvwxyz",
"scopes": ["orders:read", "orders:write", "products:read", "transactions:read"],
"expiresAt": "2026-01-06T15:00:00Z"
},
"message": "API key created successfully. Please save the token securely as it will not be shown again."
}
GET
/api/reseller/webhook
Get webhook configuration
Parameters
Example Request
GET /api/reseller/webhook
Authorization: Bearer YOUR_SESSION_TOKEN
Example Response
{
"webhook": {
"url": "https://api.example.com/webhooks/namepick",
"secret": "••••••••abc123",
"configured": true
},
"history": [
{
"id": "evt_ABC123",
"event": {
"type": "order.completed",
"timestamp": "2025-01-06T14:35:00Z"
},
"status": 200,
"responseTime": 125,
"createdAt": "2025-01-06T14:35:00Z"
}
],
"stats": {
"totalEvents": 150,
"successfulDeliveries": 148,
"failedDeliveries": 2,
"averageResponseTime": 135
}
}
PUT
/api/reseller/webhook
Update webhook configuration
Parameters
webhookUrl
string* - Webhook endpoint URLgenerateNewSecret
boolean - Generate new webhook secret (default: false)Example Request
{
"webhookUrl": "https://api.example.com/webhooks/namepick",
"generateNewSecret": true
}
Example Response
{
"success": true,
"webhook": {
"url": "https://api.example.com/webhooks/namepick",
"secret": "••••••••xyz789",
"configured": true
},
"message": "Webhook configuration updated successfully"
}
Authentication
POST
/api/auth/signin
Sign in with email and password
Parameters
email
string* - User email addresspassword
string* - User passwordExample Request
{
"email": "user@example.com",
"password": "your-password"
}
Example Response
{
"user": {
"id": "123",
"email": "user@example.com",
"name": "John Doe",
"role": "member"
},
"url": "https://namepick.co/dashboard"
}
SDKs & Libraries
Official SDKs for popular programming languages
JavaScript/Node.js
npm install @namepick.co/sdk
Python
pip install namepick.co
PHP
composer require namepick.co/sdk
Ruby
gem install namepick.co
Go
go get github.com/namepick.co/go-sdk
Java
Maven: com.namepick.co:sdk
Webhook Events
Available webhook events for reseller integration
Event Types
order.created
New order createdorder.completed
Order successfully completedorder.failed
Order processing failedorder.cancelled
Order cancelledcommission.earned
Commission earned on ordercommission.paid
Commission added to balancepayout.requested
Payout request createdpayout.completed
Payout successfully processeddomain.registered
Domain registration completeddomain.renewed
Domain renewal completedbalance.low
Account balance below thresholdaccount.activated
Reseller account activatedWebhook Payload Structure
{
"id": "evt_1234567890",
"type": "order.completed",
"timestamp": "2025-01-06T14:35:00Z",
"data": {
// Event-specific data
}
}
Signature Verification
Verify webhook authenticity using HMAC-SHA256 signature:
// Node.js example
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const hash = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(hash)
);
}
Reseller API Authentication
Using API keys for programmatic access
API Key Format
Reseller API keys follow the format:
rk_live_[random_string]
Using API Keys
Include your API key in the Authorization header:
curl -X GET https://namepick.co/api/reseller/orders \
-H "Authorization: Bearer rk_live_1234567890abcdef" \
-H "Content-Type: application/json"
API Key Scopes
orders:read
View order details and historyorders:write
Create and manage ordersproducts:read
View product catalog and pricingtransactions:read
View transaction historywebhooks:manage
Configure webhook endpointsaccount:read
View account informationreports:read
Generate and download reportsNeed Help?
Our developer support team is here to help you integrate our API