# How to Create a Voice Agent Account

Create a voice agent account to enable your application to send and receive voice messages through the Carbon Voice API.

## Steps

1. **Navigate to Agents**
   
   - **Desktop app, web, or Developer Portal**: Select "Agents" on the left sidebar
   - **Mobile**: Select "Agents" under the profile menu

2. **Create an Agent**
   
   - Click "Create Agent"
   - Enter a name for your agent (e.g., "My Voice Bot")
   - Configure any additional settings as needed
   - Save your agent

3. **Generate a Personal Access Token (PAT)**
   
   - Select your newly created agent
   - Navigate to the "Tokens" or "API Keys" section
   - Click "Generate Token" or "Create PAT"
   - The token will be prefixed with `cv_pat_`
   - Copy the token immediately — you won't be able to see it again

4. **Store Your Token Securely**
   
   - Save the PAT in a secure location (environment variables, secrets manager, or `.env` file)
   - Never commit your PAT to version control
   - Add `.env` to your `.gitignore` file if using environment variables

## Using Your PAT

Include the PAT in the `Authorization` header for all API requests:

```
Authorization: Bearer cv_pat_<your-token>
```

## Managing Your Agent

- **View agents**: Access all your agents from the Developer Portal dashboard
- **Revoke tokens**: Revoke compromised or unused PATs from the agent settings
- **Register Webhooks**: Register webhooks to receive events from the agent
- **Update settings**: Modify agent configuration as needed

## Security Best Practices

- Rotate PATs periodically
- Restrict webhook registration to trusted users only
- Use separate agent accounts for different environments (dev, staging, production)
- Never share PATs in public repositories or communication channels

## Troubleshooting

**Issue**: Need to regenerate a lost token
- You'll need to create a new PAT — old tokens cannot be retrieved
- Update your application with the new token
- Revoke the old token if it was compromised
