First Project & API Token¶
This guide walks you through creating a project and generating a long-lived API token — the two things you need before provisioning any resource.
Prerequisites¶
You have an account and are logged in. If not, complete the Quick Start first.
1. Identify your organization¶
Note the id field — you'll use it throughout this guide as $ORG_ID.
Multi-organization accounts
If your account belongs to more than one organization, append ?organization_id=$ORG_ID to every request so the server knows which organization to act in. Requests from multi-org accounts without this parameter are rejected with 403 Forbidden. Select the active organization in the dashboard via the org-switcher in the top navigation, or with bnerd org switch in the CLI — both inject the parameter automatically on every subsequent request.
2. Create a project¶
Projects are the namespace resources live in. Create one for each environment or workload you want to separate.
curl -X POST https://api.bnerd.cloud/organizations/$ORG_ID/projects \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"project": {"name": "production"}}'
The response includes the project id — save it as $PROJECT_ID.
3. Get a static API token¶
JWTs expire. For Terraform, CI/CD pipelines, and scripts you want a long-lived static token that doesn't require re-authentication.
Create a token in the dashboard¶
- Go to Account (top-right menu) → Settings → API Tokens (
/account/tokens). - Enter a Token name (e.g.
ci-deployorterraform-prod) and the Scopes your automation needs, comma-separated (e.g.dns:read, rgw_users:*). At least one scope is required. - Click Create token.
- A dialog shows the raw token value — copy it immediately. It is shown only once and cannot be retrieved after you close the dialog.
One-time reveal
The token value is never stored in plaintext. If you close the dialog without copying it you must revoke and create a new token.
Test your token once you have it:
4. List projects to confirm¶
Using the dashboard¶
All the steps above are also available without leaving app.bnerd.cloud:
- Create a project: Organizations → your org → Projects → New Project
- Static API token: Account → Settings → API Tokens → Create token
Using the CLI¶
# Authenticate (writes ~/.bnerd.yaml)
bnerd login
# List organizations
bnerd organizations list
# Create a project
bnerd projects create my-first-project
# Confirm it exists
bnerd projects list
Using Terraform¶
See Infrastructure as Code with Terraform for the full setup.
Troubleshooting¶
| Symptom | Likely cause | Fix |
|---|---|---|
401 on API calls | Token expired or malformed | Re-authenticate: bnerd login (for JWT) or create a new static token in Account → Settings → API Tokens |
403 on project create | Missing projects:create permission | Check your membership role in Dashboard → Settings → Members |
| Token shown only once | Expected behavior for static tokens | Store the token value immediately — it is not retrievable afterwards |
What's next¶
| Task | Guide |
|---|---|
| Launch your first server | Quick Start |
| Provision object storage | Provision S3 Storage |
| Set up DNS | Manage DNS |
| Deploy a cluster | Deploy a Kubernetes Cluster |
| Manage everything as code | Infrastructure as Code with Terraform |