API ReferenceAPI Keys
Create a new API key
Create a new API key for authenticating with the Anvesh API. **Important:** The full API key is only returned once in this response. Store it securely - you won't be able to retrieve it again! **Tiers:** - `free` - 1,000 leads/month - `pro` - 10,000 leads/month - `enterprise` - Unlimited
Header Parameters
X-Admin-Secret*string
Request Body
application/json
name*string
A descriptive name for this API key
tier?string
Pricing tier for rate limiting. Options: free, pro, enterprise
Default
"free"expires_in_days?|
Number of days until the key expires. Leave empty for no expiration.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:8000/admin/keys" \ -H "X-Admin-Secret: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Production Key" }'{
"data": {
"id": 1,
"name": "Example"
},
"error": false,
"message": "Operation completed successfully",
"success": true
}{
"data": {
"errors": [
"field -> error message"
]
},
"error": true,
"message": "Validation error",
"success": false
}{
"data": {
"errors": [
"field -> error message"
]
},
"error": true,
"message": "Validation error",
"success": false
}{
"data": {
"errors": [
"field -> error message"
]
},
"error": true,
"message": "Validation error",
"success": false
}{
"data": {
"errors": [
"field -> error message"
]
},
"error": true,
"message": "Validation error",
"success": false
}{
"data": {
"errors": [
"field -> error message"
]
},
"error": true,
"message": "Validation error",
"success": false
}{
"data": {
"errors": [
"field -> error message"
]
},
"error": true,
"message": "Validation error",
"success": false
}