Skip to content
Product Docs

Create Project

client.Projects.New(ctx, params) (*Project, error)
POST/api/v2/projects

Create a new project in the given organization.

ParametersExpand Collapse
params ProjectNewParams
OrganizationID param.Field[string]

Query param

formatuuid
Name param.Field[string]

Body param: The project’s display name.

maxLength3000
minLength1
ReturnsExpand Collapse
type Project struct{…}

API response schema for a project.

ID string

The project’s unique identifier.

Name string

The project’s display name.

OrganizationID string

The organization the project belongs to.

CreatedAt TimeOptional

Creation datetime

formatdate-time
IsDefault boolOptional

Whether this project is the default project for its organization.

UpdatedAt TimeOptional

Update datetime

formatdate-time

Create Project

package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llamacloud-admin-go"
  "github.com/run-llama/llamacloud-admin-go/option"
)

func main() {
  client := llamacloudadmin.NewClient(
    option.WithAPIKey("My API Key"),
  )
  project, err := client.Projects.New(context.TODO(), llamacloudadmin.ProjectNewParams{
    OrganizationID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    Name: "x",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", project.ID)
}
{
  "id": "id",
  "name": "name",
  "organization_id": "organization_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "is_default": true,
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "name": "name",
  "organization_id": "organization_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "is_default": true,
  "updated_at": "2019-12-27T18:11:19.117Z"
}