Organizations, Projects & Users
Create organizations and projects, list the projects in an organization, and inspect the current user account.
Organizations and projects are the account-level containers in Voidhash. An organization groups your team and billing; a project lives inside an organization and owns everything else — products, perks, paywalls, API keys, and persons. The endpoints on this page manage those containers and the user account itself.
These endpoints require a user session
Unlike the rest of the API, organization, project, and user endpoints operate on your account,
not on a single project. Authenticate with a user API key (x-api-key) or a dashboard session
cookie. Project-scoped secret keys and publishable keys are not accepted here — they belong to
one project and cannot create or enumerate account-level resources. See
Authentication.
Create an Organization
POST /api/v1/organizations
Creates a new organization owned by the authenticated user.
curl -X POST https://api.voidhash.com/api/v1/organizations \
-H "x-api-key: <your-user-api-key>" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Inc" }'Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the organization. The slug is derived server-side. |
Response
Returns the created Organization:
{
"id": "org_...",
"name": "Acme Inc",
"slug": "acme-inc"
}Errors
| Status | _tag | When |
|---|---|---|
401 | Api/NotAuthenticatedError | Missing or invalid credentials. |
500 | Api/OrganizationServiceError | The organization could not be created. |
Create a Project
POST /api/v1/projects
Creates a new project inside an organization you belong to.
curl -X POST https://api.voidhash.com/api/v1/projects \
-H "x-api-key: <your-user-api-key>" \
-H "Content-Type: application/json" \
-d '{ "name": "My App", "organizationId": "org_..." }'Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the project. The slug is derived server-side. |
organizationId | string | Yes | The organization the project belongs to. |
Response
Returns the created Project:
{
"id": "proj_...",
"name": "My App",
"slug": "my-app"
}Errors
| Status | _tag | When |
|---|---|---|
401 | Api/NotAuthenticatedError | Missing or invalid credentials. |
403 | Api/ActionForbiddenError | You are not a member of the target organization. |
500 | Api/AuthenticationError | The session could not be resolved. |
500 | Api/ProjectServiceError | The project could not be created. |
Next step: create keys for the project
A new project has no credentials yet. Create a secret key for server-side use with
POST /api/v1/api-keys — see API Keys.
List Projects
GET /api/v1/projects/:organizationId
Lists all projects in an organization you belong to.
curl https://api.voidhash.com/api/v1/projects/org_... \
-H "x-api-key: <your-user-api-key>"Response
Returns an array of Project objects:
[
{ "id": "proj_...", "name": "My App", "slug": "my-app" },
{ "id": "proj_...", "name": "My Other App", "slug": "my-other-app" }
]Errors
| Status | _tag | When |
|---|---|---|
401 | Api/NotAuthenticatedError | Missing or invalid credentials. |
403 | Api/ActionForbiddenError | You are not a member of the organization. |
500 | Api/ProjectServiceError | Projects could not be loaded. |
Get the Current User
GET /api/v1/users/current
Returns the authenticated user, including every organization and project they have access to. This is the endpoint to call when you need to discover which projects a user API key can act on.
curl https://api.voidhash.com/api/v1/users/current \
-H "x-api-key: <your-user-api-key>"Response
Returns the User:
{
"id": "user_...",
"name": "Ada Lovelace",
"email": "ada@example.com",
"emailVerified": true,
"image": null,
"createdAt": "2026-01-15T09:30:00.000Z",
"updatedAt": "2026-07-01T12:00:00.000Z",
"organizations": [
{
"id": "org_...",
"name": "Acme Inc",
"slug": "acme-inc",
"logo": null,
"workosOrganizationId": null
}
],
"projects": [
{
"id": "proj_...",
"name": "My App",
"slug": "my-app",
"logo": null,
"organizationId": "org_..."
}
]
}User fields
| Field | Type | Description |
|---|---|---|
id | string | User id. |
name | string | Display name. |
email | string | Email address. |
emailVerified | boolean | Whether the email address has been verified. |
image | string | null | Avatar URL, if set. |
createdAt | string | ISO timestamp of account creation. |
updatedAt | string | ISO timestamp of the last account update. |
organizations | array | Organizations the user belongs to: { id, name, slug, logo | null, workosOrganizationId | null }. |
projects | array | Projects the user can access: { id, name, slug, logo | null, organizationId }. |
Errors
| Status | _tag | When |
|---|---|---|
401 | Api/NotAuthenticatedError | Missing or invalid credentials. |
500 | Api/AuthenticationError | The session could not be resolved. |
500 | Api/UserServiceError | The user could not be loaded. |
Related
- Authentication — credential types and which endpoints accept them.
- API Keys — create secret and publishable keys for a project.
- API Overview — base URLs, error format, and OpenAPI documents.