What is Nanoid?
A nanoid is a unique, URL-friendly identifier that follows a specific format: prefix + hyphen + 12-character random string. All nanoids in Rise are exactly 15 characters long and use a standardized prefix system to identify the entity type.Nanoid Format
te-abc123def456 (15 characters total)
Core Entity Nanoids
The primary entity types in Rise each have their own nanoid format:Team Nanoid
Format:
Example:
te-abc123def456Example:
te-xyz789abc123Company Nanoid
Format:
Example:
co-abc123def456Example:
co-def456ghi789User Nanoid
Format:
Example:
us-abc123def456Example:
us-ghi789jkl012Complete Nanoid Reference
Here are all the nanoid types used in Rise B2B API:Core Entities
Financial & Operational Entities
Nanoid Usage in API
Entity Balance API
The most common usage is in the entity balance endpoint:Team Management API
Team operations use team nanoids:Payments API
Payment operations use payment nanoids:Invites API
Invite management uses invite nanoids:Nanoid Validation
When working with nanoids, you should validate their format before making API calls:Validation Rules
- Length: Must be exactly 15 characters
- Format: Must follow the pattern
[prefix]-[12 random characters] - Prefix: Must start with a valid prefix (
te-,co-,us-,pa-,pg-,in-)
Client-Side Validation
Error Handling
Common errors when working with nanoids:Common Error Scenarios
Invalid Nanoid Format:Best Practices
Validation
Always validate nanoid format before using
Documentation
Document which nanoid types your integration uses
Security
Never expose nanoid generation logic to clients
Caching
Cache nanoid lookups for performance
Security Considerations
- Client-side validation: Always validate nanoid format before making API calls
- No sequential patterns: Nanoids are cryptographically random
- Prefix validation: Always validate the prefix matches expected entity type
- Length validation: Ensure nanoids are exactly 15 characters
Performance Tips
- Batch operations: Use batch endpoints when working with multiple nanoids
- Caching: Cache frequently accessed nanoid lookups
- Validation: Validate nanoid format early to avoid unnecessary API calls
Related Concepts
RiseID
Understanding RiseID for authentication
Entity Balance
Balance management with nanoid
Teams
Team management concepts
Permissions
Understanding access control
Nanoid vs RiseID: Remember that nanoids are used for API operations and database references, while RiseID is used for authentication and smart contract interactions.
