client.projects().create() creates a project. The machine identity needs an organization role that allows it to create projects, such as Member.
const project = await client.projects().create({
projectName: "payments-api",
type: "secret-manager",
});
const project = await client.projects().create({
projectName: "payments-api",
type: "secret-manager",
projectDescription: "Secrets for the payments API",
template: "<template-name>",
});
{
"id": "5e8d7c6b-4a3f-4e2d-9c1b-0a9f8e7d6c5b",
"name": "payments-api",
"slug": "payments-api-k3x9",
"description": "Secrets for the payments API",
"type": "secret-manager",
"orgId": "2c1b0a9f-8e7d-4c6b-5a4f-3e2d1c0b9a8f",
"environments": [
{ "id": "c4e2a1b9-7d3f-4a6e-9b8c-5f0e1d2c3b4a", "name": "Development", "slug": "dev" },
{ "id": "d5f3b2c0-8e4a-4b7f-0c9d-6a1f2e3d4c5b", "name": "Staging", "slug": "staging" },
{ "id": "e6a4c3d1-9f5b-4c8a-1d0e-7b2a3f4e5d6c", "name": "Production", "slug": "prod" }
],
"createdAt": "2026-12-02T10:40:02.915Z",
"updatedAt": "2026-12-02T10:40:02.915Z"
}
Create a project
Create a project with the Node.js SDK.
const project = await client.projects().create({
projectName: "payments-api",
type: "secret-manager",
});
const project = await client.projects().create({
projectName: "payments-api",
type: "secret-manager",
projectDescription: "Secrets for the payments API",
template: "<template-name>",
});
{
"id": "5e8d7c6b-4a3f-4e2d-9c1b-0a9f8e7d6c5b",
"name": "payments-api",
"slug": "payments-api-k3x9",
"description": "Secrets for the payments API",
"type": "secret-manager",
"orgId": "2c1b0a9f-8e7d-4c6b-5a4f-3e2d1c0b9a8f",
"environments": [
{ "id": "c4e2a1b9-7d3f-4a6e-9b8c-5f0e1d2c3b4a", "name": "Development", "slug": "dev" },
{ "id": "d5f3b2c0-8e4a-4b7f-0c9d-6a1f2e3d4c5b", "name": "Staging", "slug": "staging" },
{ "id": "e6a4c3d1-9f5b-4c8a-1d0e-7b2a3f4e5d6c", "name": "Production", "slug": "prod" }
],
"createdAt": "2026-12-02T10:40:02.915Z",
"updatedAt": "2026-12-02T10:40:02.915Z"
}
Was this page helpful?