Skip to main content
POST
Create API Key
Create a new API key for your account with granular permissions and optional expiration. This endpoint allows you to generate API keys programmatically for different use cases and team members.
You need an existing API key to create new ones. If you don’t have any API keys yet, create your first one through the Buena.ai dashboard.

Request

x-api-key
string
required
Your existing API key for authentication
Content-Type
string
required
Must be application/json

Body Parameters

name
string
required
Human-readable name for the API key (e.g., “Production Integration”, “Development Key”)
permissions
array
default:"[]"
Array of permissions to grant to this API key. See permission reference.
expiresInDays
number
default:"365"
Number of days until the API key expires (1-365 days). Set to 0 for no expiration.

Response

success
boolean
Always true for successful requests
data
object
The created API key information
message
string
Success message with security reminder

Available Permissions

  • linkedin:schedule - Schedule LinkedIn actions (connection requests, messages) - linkedin:upload - Upload prospect lists for automation campaigns - linkedin:read - Read LinkedIn data and integration status
  • leads:read - Read lead data and search leads - leads:write - Create, update, and delete leads - leads:enrich - Enrich lead data with external sources
  • users:read - Read user data and team information - admin - Full administrative access to account

Common Permission Sets

Here are some common permission combinations for different use cases:

Read-Only Access

LinkedIn Automation

Full Lead Management

Complete Integration

Use Cases & Examples

1. Development Environment Key

Create a key for development with read-only permissions:

2. Production Integration Key

Create a key for production with full permissions:

3. Team Member Key

Create a restricted key for a team member:

4. Temporary Integration Key

Create a short-lived key for testing:

Security Best Practices

Only grant the minimum permissions needed:
Rotate keys regularly, especially for production:
Track API key usage for security monitoring:

Error Responses

Invalid Permissions (400)

Insufficient Permissions (403)

Rate Limited (429)

Important Security Note: The full API key is only returned once during creation. Store it immediately in a secure location. If you lose the key, you’ll need to regenerate it or create a new one.

Next Steps

After creating your API key:

Test Your Key

Verify your new key works with a health check

List All Keys

View all your API keys and their permissions

Start Automating

Begin LinkedIn automation with your new key

Best Practices

Learn security best practices for API keys