Welcome to the Weir AI API v1.0.1 Quick Start Guide! This guide will get you from zero to making your first API call in just a few minutes.
Prerequisites
Before you begin, ensure you have:
API Credentials Access to Weir AI API credentials (API key or basic auth credentials)
Development Environment A development environment with your preferred programming language
HTTP Client A tool to make HTTP requests (curl, Postman, or your preferred client)
Basic API Knowledge Familiarity with REST APIs and JSON (we’ll guide you through everything)
Choose Your API Category
Weir AI API v1.0.1 offers different API categories for different use cases:
For : Third-party integrations and public-facing applications
Generate access tokens for external applications
Basic authentication with client credentials
Limited scope for public integrations
Use External APIs when building integrations that will be used by external developers or third-party applications.
For : Organization management and internal operations
Team management and member invitations
Platform creation and management
Client and talent roster management
User profile and authentication management
Subscription and billing management
Use Console APIs for building internal management tools and organization administration features.
For : Platform administration and system management
Administrative user management
System-wide platform and organization management
Pod management and system control
Mail template management
Comprehensive logging and monitoring
Admin APIs require special administrative privileges and should only be used by authorized system administrators.
Step 1: Set Up Authentication
For External APIs
Get Your Credentials
Obtain your clientId and secretKey from the Weir AI dashboard. export CLIENT_ID = "your_client_id_here"
export SECRET_KEY = "your_secret_key_here"
export API_BASE_URL = "https://api.weir.ai"
Generate Access Token
Use basic authentication to generate an access token. curl -X POST 'https://api.weir.ai/auth/token' \
-H 'Content-Type: application/json' \
-u 'your_client_id:your_secret_key'
{
"data" : {
"accessToken" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"expiresIn" : 3600 ,
"tokenType" : "Bearer"
},
"message" : "Access token generated successfully" ,
"status" : "success"
}
For Console APIs
Register or Login
Create an account or login to get your console credentials. curl -X POST 'https://api.weir.ai/auth/register' \
-H 'Content-Type: application/json' \
-d '{
"fullname": "John Doe",
"email": "john@example.com",
"password": "securePassword123",
"organization": {
"name": "My Company",
"type": "Platform",
"description": "A business platform"
}
}'
Validate Registration
If registration requires validation, use the OTP validation endpoint. curl -X POST 'https://api.weir.ai/auth/validate/registration' \
-H 'Content-Type: application/json' \
-d '{
"otpSession": "your_otp_session_id",
"otp": "123456"
}'
Login and Get Tokens
Login to get your access and refresh tokens. curl -X POST 'https://api.weir.ai/auth/login' \
-H 'Content-Type: application/json' \
-d '{
"username": "John Doe",
"password": "securePassword123"
}'
Step 2: Make Your First API Call
External API Example
Set Up Your Request
Use the access token from Step 1 to make authenticated requests. curl -X GET 'https://api.weir.ai/external/endpoint' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Console API Example - Create a Team
Create Your First Team
Use the Console API to create a team for your organization. curl -X POST 'https://api.weir.ai/org/create/team' \
-H 'Authorization: Bearer YOUR_CONSOLE_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"name": "Development Team"
}'
{
"data" : {
"teamId" : "team_123456789" ,
"name" : "Development Team" ,
"createdAt" : "2025-01-15T10:30:00Z" ,
"memberCount" : 1
},
"message" : "Team created successfully" ,
"status" : "success"
}
Invite Team Members
Invite members to your newly created team. curl -X POST 'https://api.weir.ai/org/invite/team/member/team_123456789' \
-H 'Authorization: Bearer YOUR_CONSOLE_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"firstname": "Jane",
"lastname": "Smith",
"email": "jane@example.com",
"role": "Organization_User"
}'
Step 3: Explore Advanced Features
Create a Platform
Create a platform for your organization. curl -X POST 'https://api.weir.ai/org/create/platform' \
-H 'Authorization: Bearer YOUR_CONSOLE_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"name": "My Platform",
"teamId": "team_123456789",
"description": "A sample platform",
"type": "Forum/Community",
"domain": "myplatform.com"
}'
Verify Your Platform
Verify your platform domain. curl -X GET 'https://api.weir.ai/org/verify/platform/PLATFORM_ID' \
-H 'Authorization: Bearer YOUR_CONSOLE_TOKEN' \
-H 'x-source: console'
Client Management
Create a Client
Create a client for your platform. curl -X POST 'https://api.weir.ai/org/create/client' \
-H 'Authorization: Bearer YOUR_CONSOLE_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"name": "My Client App",
"environment": "production"
}'
Step 4: Handle Authentication Refresh
Refresh Your Token
When your access token expires, use the refresh token to get a new one. curl -X POST 'https://api.weir.ai/auth/refresh/token' \
-H 'Content-Type: application/json' \
-d '{
"refreshToken": "YOUR_REFRESH_TOKEN"
}'
{
"data" : {
"accessToken" : "new_access_token_here" ,
"refreshToken" : "new_refresh_token_here" ,
"expiresIn" : 3600
},
"message" : "Token refreshed successfully" ,
"status" : "success"
}
Step 5: Error Handling
Handle Common Errors
Learn how to handle common API errors gracefully.
{
"error" : {
"code" : "UNAUTHORIZED" ,
"message" : "Invalid or expired token" ,
"details" : "The provided access token is invalid or has expired"
},
"status" : "error"
}
Solution : Refresh your token or re-authenticate.
{
"error" : {
"code" : "VALIDATION_ERROR" ,
"message" : "Invalid request parameters" ,
"details" : {
"name" : "Team name is required" ,
"email" : "Invalid email format"
}
},
"status" : "error"
}
Solution : Check your request parameters and fix validation errors.
{
"error" : {
"code" : "RATE_LIMIT_EXCEEDED" ,
"message" : "Too many requests" ,
"details" : "Rate limit of 100 requests per minute exceeded"
},
"status" : "error"
}
Solution : Implement exponential backoff and respect rate limits.
Next Steps
Explore API Reference Dive deep into the complete API reference with detailed endpoint documentation, parameters, and response examples.
Try the API Playground Test endpoints interactively in your browser with our built-in API playground.
Read Integration Guides Learn best practices and integration patterns for different use cases.
Join the Community Connect with other developers and get help from the Weir AI community.
Common Use Cases
Building a Third-Party Integration
Use External APIs to build integrations that other developers can use. Focus on authentication and basic API access.
Organization Management Tool
Use Console APIs to build internal tools for managing teams, platforms, and users within your organization.
Use Admin APIs to build administrative tools for managing the entire Weir AI platform and system resources.
Pro Tip : Start with the API Playground to explore endpoints interactively, then use the detailed API reference for implementation. The integration guides provide real-world patterns and best practices.
Congratulations! You’ve successfully set up Weir AI API v1.0.1 and made your first API calls. You’re now ready to build powerful integrations with our platform.