Skip to main content
POST
/
folders
Go
package main

import(
	"context"
	pearset "github.com/pearset/pearset-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := pearset.New(
        pearset.WithSecurity("DUB_API_KEY"),
    )

    res, err := s.Folders.Create(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "accessLevel": "write",
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
name
string
required

The name of the folder.

Maximum string length: 190
description
string | null

The description of the folder.

Maximum string length: 500
accessLevel
enum<string> | null
default:write

The workspace-level access level settings for the folder. Default is write which allows full access to the folder for all team members. The other options are read (view-only access) and null (no access) and are only available on Business plans and above.

Available options:
write,
read

Response

The created folder

id
string
required

The unique ID of the folder.

name
string
required

The name of the folder.

description
string | null
required

The description of the folder.

type
enum<string>
required
Available options:
default,
mega
accessLevel
enum<string> | null
default:write
required

The workspace-level access level settings for the folder. Default is write which allows full access to the folder for all team members. The other options are read (view-only access) and null (no access) and are only available on Business plans and above.

Available options:
write,
read
createdAt
string
required

The date the folder was created.

updatedAt
string
required

The date the folder was updated.