This section covers user management, roles, and permissions for Cosmic JS (now Cosmic) and associated analytics tools. Cosmic is a headless CMS that provides API-first content management for modern web and mobile applications.
Overview
Cosmic provides comprehensive user management capabilities designed for development teams and content creators working with headless architecture. As a cloud-based headless CMS, Cosmic emphasizes flexible content delivery through APIs while offering robust collaboration features.
User management in Cosmic features:
- Cloud-based administration through the Cosmic dashboard
- Role-based access control with customizable permissions
- API key management for secure programmatic access
- Bucket-based organization for separating projects and teams
- Read and Write API keys with different permission levels
- Webhook support for real-time content notifications
Cosmic is ideal for JAMstack websites, mobile apps, and multi-channel content delivery requiring developer-friendly APIs.
Platform User Management
- Roles & Permissions - Understanding user roles
- Adding & Removing Users - User administration
Accessing User Management
To manage users in Cosmic:
- Log in to your Cosmic dashboard at app.cosmicjs.com
- Select your Bucket (project)
- Navigate to Settings > Team Members or Users
- View current team members and their roles
User management is available on all plans, with team member limits varying by subscription tier.
Cosmic User Roles
Cosmic provides a flexible role system for team collaboration:
Owner
Bucket owners have complete control:
- Full access to all bucket content and settings
- Can manage all team members and permissions
- Control over billing and subscription (for account level)
- Can create, modify, and delete object types
- Full access to all API keys
- Can configure webhooks and integrations
- Can delete the bucket
- Access to all extensions and apps
When to use: Assigned to bucket creator and primary account holder.
Developer
Developers have technical access:
- Can modify object types and schemas
- Full access to API keys and documentation
- Can configure webhooks
- Cannot manage billing
- Cannot delete the bucket
- Can publish and unpublish content
- Access to developer tools and extensions
- Can modify bucket settings
When to use: Assign to software engineers integrating Cosmic.
Editor
Editors manage content publication:
- Can create, edit, and publish content
- Upload and manage media files
- Cannot modify object types
- Cannot access API keys
- Cannot manage users or billing
- Can preview content before publishing
- Access to scheduling features
- Can manage content in all locales
When to use: Assign to content managers and editorial team.
Contributor
Contributors create content with limitations:
- Can create and edit their own content
- Can save drafts
- Cannot publish without approval
- Cannot edit others' content
- Limited media upload permissions
- Cannot modify settings
- Can view published content
When to use: Assign to content creators who need editorial oversight.
Bucket Management
Cosmic organizes content into Buckets (projects):
Creating Buckets
Buckets provide complete separation of:
- Content and object types
- Team members and permissions
- API keys and webhooks
- Billing (on some plans)
Use Cases for Multiple Buckets
- Separate projects or websites
- Development, staging, and production environments
- Client-specific content management
- Different brands or business units
- Multi-tenant applications
Bucket-Level Permissions
Each bucket maintains its own:
- Team member list
- Role assignments
- API keys
- Webhook configurations
API Key Management
Cosmic uses API keys for all programmatic access:
API Key Types
Read Keys:
- Public, read-only access to published content
- Safe to use in client-side applications
- Cannot modify or delete content
- No rate limits on free plans
- Included in all subscription tiers
Write Keys:
- Full API access including content creation
- Must be kept secret (server-side only)
- Can create, update, delete content
- Can modify object types
- Higher rate limits
Managing API Keys
To create and manage API keys:
- Navigate to Settings > API Access
- View existing Read and Write keys
- Click Regenerate Key to rotate keys
- Copy keys to clipboard
- Store keys securely in environment variables
API Key Security Best Practices
- Never Commit Keys: Don't include in version control
- Use Environment Variables: Store in .env files or secret managers
- Separate Environments: Different keys for dev/staging/production
- Rotate Regularly: Change write keys every 90 days
- Use Read Keys Client-Side: Only use write keys server-side
- Monitor Usage: Review API usage analytics
- Revoke Compromised Keys: Regenerate immediately if exposed
Adding and Inviting Team Members
Inviting Users
To add a team member to a Cosmic bucket:
- Navigate to Settings > Team Members
- Click Invite Team Member
- Enter the user's email address
- Select appropriate role
- Optionally add a message
- Click Send Invitation
The invitee receives an email to:
- Create a Cosmic account (if new)
- Accept the bucket invitation
- Access the shared bucket
Team Member Limits
User limits by plan:
- Free Plan: 1 user per bucket
- Startup Plan: Up to 5 users
- Professional Plan: Up to 10 users
- Enterprise Plan: Unlimited users
Removing Team Members
To remove a user:
- Go to Settings > Team Members
- Find the user to remove
- Click Remove or the delete icon
- Confirm the removal
Removed users lose immediate access. Their created content remains in the bucket.
Webhooks and Integrations
Cosmic supports webhooks for real-time content updates:
Creating Webhooks
- Navigate to Settings > Webhooks
- Click Add Webhook
- Enter webhook URL (your endpoint)
- Select triggering events:
- Object created
- Object edited
- Object deleted
- Media uploaded
- Save webhook
Webhook Security
- Use HTTPS endpoints only
- Implement signature verification
- Validate webhook payloads
- Monitor webhook delivery logs
- Rotate webhook secrets periodically
Content Localization
Cosmic supports multi-language content:
Localization Features
- Create content in multiple locales
- Assign translators to specific languages
- Locale-specific API queries
- Fallback locale configuration
- Automatic locale detection
Managing Translators
Assign team members to specific locales:
- Limit access to translation workflows
- Review translated content before publishing
- Track translation progress
GraphQL API Access
Cosmic provides GraphQL in addition to REST:
GraphQL Features
- Query multiple object types in one request
- Precise field selection
- Nested relationship queries
- Real-time subscriptions (Enterprise)
GraphQL Security
- Same API keys as REST API
- Query depth limiting to prevent abuse
- Rate limiting applies to GraphQL
- Field-level permission controls
Security Best Practices
Access Control
- Use Appropriate Roles: Assign least privileged role necessary
- Limit Owners: Only 1-2 bucket owners
- Regular Audits: Review team quarterly
- Remove Inactive Users: Delete departed team members
- Separate Buckets: Use different buckets for different environments
API Security
- Protect Write Keys: Never expose in client-side code
- Environment Variables: Store keys securely
- Rate Limit Monitoring: Watch for unusual API activity
- Key Rotation: Change write keys every 90 days
- Scope Appropriately: Use read keys when possible
Webhook Security
- Verify Signatures: Implement webhook signature validation
- HTTPS Only: Don't use HTTP endpoints
- Payload Validation: Verify webhook data before processing
- Error Handling: Implement robust error handling
- Retry Logic: Handle webhook delivery failures
Common Issues and Solutions
Issue: API Key Not Working
Solution:
- Verify key hasn't been regenerated
- Check if using correct key type (read vs. write)
- Ensure proper authentication header format
- Verify bucket slug is correct
- Check for API rate limiting
Issue: User Cannot Access Bucket
Solution:
- Verify invitation was accepted
- Check user has correct email address
- Ensure user logged into correct Cosmic account
- Review role permissions
- Check if bucket was deleted or archived
Issue: Webhook Not Triggering
Solution:
- Verify webhook URL is accessible publicly
- Check webhook is enabled
- Review webhook event configuration
- Ensure endpoint returns 200 status
- Check webhook delivery logs in Cosmic dashboard
Issue: Cannot Upload Media
Solution:
- Check user role has media upload permissions
- Verify file size within limits
- Ensure file type is allowed
- Check storage quota hasn't been exceeded
- Review bucket settings for media restrictions
Issue: Content Not Appearing in API
Solution:
- Verify content is published (not draft)
- Check API query parameters
- Ensure correct bucket slug
- Verify API key permissions
- Check if content type is configured correctly
Extension Ecosystem
Cosmic supports various extensions and integrations:
Popular Cosmic Extensions
- Image Optimization: Automatic image resizing and optimization
- Search: Full-text search capabilities
- Localization: Advanced multi-language features
- Workflows: Custom content approval workflows
- Backups: Automated bucket backups
Installing Extensions
- Navigate to Extensions in sidebar
- Browse available extensions
- Click Install on desired extension
- Configure extension settings
- Activate for your bucket
Deployment Webhooks
Trigger builds when content changes:
Setting Up Deploy Hooks
- Generate deploy hook from your hosting provider (Netlify, Vercel, etc.)
- Add as webhook in Cosmic
- Select object types to trigger deployments
- Test webhook delivery
- Monitor deployment logs
Analytics Tool Access
Google Analytics 4
Manage GA4 access in Admin > Account/Property Access Management:
- Administrator: Full control over account settings and users
- Editor: Can modify configurations and settings
- Analyst: Can create reports and audiences, no configuration changes
- Viewer: Read-only access to reports and data
Since Cosmic is headless:
- Implement GA4 tracking in your frontend application
- Use Cosmic webhooks to trigger analytics events
- Track content performance through application analytics
Google Tag Manager
Manage GTM access in Admin > User Management:
- Administrator: Full control over container and users
- Publish: Can publish container changes to production
- Approve: Can approve changes but not publish
- Edit: Can edit tags and triggers but cannot approve or publish
- Read: View-only access to container configuration
Implement GTM:
- Add container code to your application
- Track Cosmic content views and interactions
- Use custom events for content engagement
Meta Business Manager
Manage access in Business Settings > People:
- Admin: Full control over business settings and assets
- Employee: Limited access based on assigned assets and permissions
Best Practices
- Use Buckets Strategically: Separate environments and projects into different buckets
- Protect Write API Keys: Never commit to version control or expose client-side
- Implement Read Keys: Use read-only keys for frontend applications
- Regular Key Rotation: Change write keys every 90 days minimum
- Monitor API Usage: Review usage analytics regularly
- Use Webhooks: Implement real-time content synchronization
- Version Control Object Types: Export and track object type schemas
- Regular Backups: Export bucket data periodically
- Document Team Structure: Maintain clear records of who has access
- Test in Development: Use separate buckets for development and production