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

FieldTypeRequiredDescription
namestringYesDisplay 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_tagWhen
401Api/NotAuthenticatedErrorMissing or invalid credentials.
500Api/OrganizationServiceErrorThe 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

FieldTypeRequiredDescription
namestringYesDisplay name of the project. The slug is derived server-side.
organizationIdstringYesThe organization the project belongs to.

Response

Returns the created Project:

{
  "id": "proj_...",
  "name": "My App",
  "slug": "my-app"
}

Errors

Status_tagWhen
401Api/NotAuthenticatedErrorMissing or invalid credentials.
403Api/ActionForbiddenErrorYou are not a member of the target organization.
500Api/AuthenticationErrorThe session could not be resolved.
500Api/ProjectServiceErrorThe 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_tagWhen
401Api/NotAuthenticatedErrorMissing or invalid credentials.
403Api/ActionForbiddenErrorYou are not a member of the organization.
500Api/ProjectServiceErrorProjects 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

FieldTypeDescription
idstringUser id.
namestringDisplay name.
emailstringEmail address.
emailVerifiedbooleanWhether the email address has been verified.
imagestring | nullAvatar URL, if set.
createdAtstringISO timestamp of account creation.
updatedAtstringISO timestamp of the last account update.
organizationsarrayOrganizations the user belongs to: { id, name, slug, logo | null, workosOrganizationId | null }.
projectsarrayProjects the user can access: { id, name, slug, logo | null, organizationId }.

Errors

Status_tagWhen
401Api/NotAuthenticatedErrorMissing or invalid credentials.
500Api/AuthenticationErrorThe session could not be resolved.
500Api/UserServiceErrorThe user could not be loaded.
  • 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.