Back to API Keys Endpoints
POST /v1/api-keys
Growth+
Create a new API key for programmatic access to the VotePipe API. API keys authenticate your requests and determine what operations you can perform based on the selected scope. When you create a key, the complete key value is only displayed once in the response - make sure to save it immediately in a secure location.
Request
http
POST https://api.votepipe.com/v1/api-keys
Authorization: Bearer mr_live_your_api_key_here
Content-Type: application/json
{
"name": "New Key",
"scope": "read"
}Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Descriptive name for the key |
| scope | string | Yes | One of: read, full |
Response (201 Created)
json
{
"data": {
"id": "2",
"name": "New Key",
"key": "mr_live_xxxxxxxxxxxx",
"prefix": "mr_live_xxxxxxxx",
"scope": "read"
},
"meta": {
"request_id": "req_abc123"
}
}⚠️ Important Security Notice:
- The full API key is only displayed once in this response
- Save the key immediately to a secure location (password manager, environment variables, etc.)
- Never commit API keys to version control systems
- If you lose the key, you must delete it and create a new one
- Use different keys for different environments (development, staging, production)