Skip to content
FeedbackDashboard

Create project

post/v0/projects

Create a new project.

Body ParametersExpand Collapse
display_name: string

Human-readable project name

org: string

Organization name

revision: map[FileInput]

File contents to commit

Accepts one of the following:
Content = object { content }
content: string

File content

URL = object { url }
url: string

URL to fetch file content from

slug: string

Project name/slug

targets: array of Target

Targets to generate for

Accepts one of the following:
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
ReturnsExpand Collapse
Project = object { config_repo, display_name, object, 3 more }

A project is a collection of SDKs generated from the same set of config files.

config_repo: string
display_name: string
object: "project"
org: string
slug: string
targets: array of Target
Accepts one of the following:
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
Create project
curl https://api.stainless.com/v0/projects \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $STAINLESS_API_KEY" \
    -d '{
          "display_name": "display_name",
          "org": "org",
          "revision": {
            "foo": {
              "content": "content"
            }
          },
          "slug": "slug",
          "targets": [
            "node"
          ]
        }'
{
  "config_repo": "config_repo",
  "display_name": "display_name",
  "object": "project",
  "org": "org",
  "slug": "slug",
  "targets": [
    "node"
  ]
}
Returns Examples
{
  "config_repo": "config_repo",
  "display_name": "display_name",
  "object": "project",
  "org": "org",
  "slug": "slug",
  "targets": [
    "node"
  ]
}