Getting Started
Create account, generate API keys, and quick start examples
Getting Started
This guide gets you from account creation to sending your first email and SMS using the CastBrick API.
1. Account creation
- Visit the CastBrick signup page and create an account.
- Verify your email address and sign in to the dashboard.
2. API key generation
- Navigate to Settings > API Keys in the dashboard.
- Create a new API key with an appropriate name and permissions (e.g.,
send:email,send:sms). - Copy the secret value — you will not see it again.
Keep your API keys secret. Use environment variables for server-side apps.
3. Quick start — Send an email (HTTP)
Request
POST /v1/email/send
Host: api.castbrick.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"from": "no-reply@yourdomain.com",
"to": ["alice@example.com"],
"subject": "Welcome to CastBrick",
"html": "<p>Hello <strong>Alice</strong>, welcome!</p>",
"template_id": null
}Response (201)
{
"id": "msg_123",
"status": "queued",
"accepted": ["alice@example.com"]
}4. Quick start — Send an SMS (HTTP)
Request
POST /v1/sms/send
Host: api.castbrick.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"from": "+15551234567",
"to": ["+15557654321"],
"body": "Your verification code is 123456",
"template_id": null
}Response (201)
{
"id": "sms_456",
"status": "queued",
"accepted": ["+15557654321"]
}5. Next steps
- Explore the API Reference for full endpoint definitions.
- Pick an SDK from the SDKs section to integrate more easily.