Projects
Create a new project
Create a new project with the specified name. The project will be created with default Chunkify storage settings.
Authorization
Authorization
header
string
required
Enter the team access token with the Bearer prefix, e.g. "Bearer team_access_token"
Bodyapplication/json
Project creation parameters
Name is the name of the project, which must be between 4 and 32 characters.
Pattern:
^[a-zA-Z0-9\-\_ ]+$
Responses
application/jsonData contains the response object
created_at
string
date-time
required
Timestamp when the project was created
Examples:
2025-01-01T12:00:00Z
Id is the unique identifier for the project.
Examples:
proj_2vPYfWPSk3Uejm1HHaMoDqogcVJ
Examples:
My Video Project
Slug is the slug for the project.
Examples:
my-video-project
StorageId identifier where project files are stored
Examples:
stor_chunkify_S1cce6120E56e7Tu9ioP09Nhjk1
status
"success"
string
required
Status indicates the response status "success"
The project was created successfully
application/jsonCode is the HTTP status code
Message is a human-readable error description
Examples:
Invalid request parameters
type
"ValidationError"
string
required
Type indicates the error category
Available options:
ValidationError
status
"error"
string
required
Status indicates the response status "error"
Invalid request parameters
application/jsonError response details
Code is the HTTP status code
Message is a human-readable error description
Examples:
Authentication error: invalid token or subscription inactive
type
"AuthenticationError"
string
required
Type indicates the error category
Available options:
AuthenticationError
status
"error"
string
required
Status indicates the response status "error"
Authentication error: invalid token or subscription inactive
application/jsonError response details
Code is the HTTP status code
Message is a human-readable error description
Examples:
Unauthorized to perform this action
type
"ForbiddenError"
string
required
Type indicates the error category
Available options:
ForbiddenError
status
"error"
string
required
Status indicates the response status "error"
Unauthorized to perform this action: number of projects reached the limit
application/jsonError response details
Code is the HTTP status code
Message is a human-readable error description
Examples:
Rate limit exceeded
type
"TooManyRequestsError"
string
required
Type indicates the error category
Available options:
TooManyRequestsError
status
"error"
string
required
Status indicates the response status "error"
Rate limit exceeded
# Create a new project
> Create a new project with the specified name. The project will be created with default Chunkify storage settings.
```json
{
"path": "/api/projects",
"method": "post",
"schema": {
"description": "Create a new project with the specified name. The project will be created with default Chunkify storage settings.",
"operationId": "createProject",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectCreateParams"
}
}
},
"description": "Project creation parameters",
"required": true,
"x-originalParamName": "request"
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectResponse"
}
}
},
"description": "The project was created successfully"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorValidation"
}
}
},
"description": "Invalid request parameters"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorAuthentication"
}
}
},
"description": "Authentication error: invalid token or subscription inactive"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorForbidden"
}
}
},
"description": "Unauthorized to perform this action: number of projects reached the limit"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorTooManyRequests"
}
}
},
"description": "Rate limit exceeded"
}
},
"security": [
{
"TeamAccessToken": []
}
],
"summary": "Create a new project",
"tags": [
"Projects"
],
"x-codeSamples": [
{
"lang": "JavaScript",
"source": "import Chunkify from '@chunkify/chunkify';\n\nconst client = new Chunkify({\n teamAccessToken: 'My Team Access Token',\n});\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project);"
},
{
"lang": "Python",
"source": "from chunkify import Chunkify\n\nclient = Chunkify(\n team_access_token=\"My Team Access Token\",\n)\nproject = client.projects.create(\n name=\"My Project\",\n)\nprint(project)"
},
{
"lang": "php",
"source": "\u003c?php\n\nuse Chunkify\\Client;\n\n$client = new Client(\n teamAccessToken: 'My Team Access Token',\n);\n\n$project = $client-\u003eprojects-\u003ecreate(name: 'My Project');\n\nvar_dump($project);"
},
{
"lang": "Go",
"source": "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/chunkifydev/chunkify-go\"\n \"github.com/chunkifydev/chunkify-go/option\"\n)\n\nfunc main() {\n client := chunkify.NewClient(\n option.WithTeamAccessToken(\"My Team Access Token\"),\n )\n project, err := client.Projects.New(context.TODO(), chunkify.ProjectNewParams{\n Name: \"My Project\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", project)\n}\n"
}
]
}
}
```
```json #/components/schemas/ProjectCreateParams
{
"properties": {
"name": {
"description": "Name is the name of the project, which must be between 4 and 32 characters.",
"examples": [
"My Project"
],
"maxLength": 32,
"minLength": 4,
"pattern": "^[a-zA-Z0-9\\-\\_ ]+$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
```
```json #/components/schemas/ProjectResponse
{
"properties": {
"data": {
"$ref": "#/components/schemas/Project",
"description": "Data contains the response object"
},
"status": {
"const": "success",
"description": "Status indicates the response status \"success\"",
"type": "string"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
```
```json #/components/schemas/Project
{
"properties": {
"created_at": {
"description": "Timestamp when the project was created",
"examples": [
"2025-01-01T12:00:00Z"
],
"format": "date-time",
"type": "string"
},
"id": {
"description": "Id is the unique identifier for the project.",
"examples": [
"proj_2vPYfWPSk3Uejm1HHaMoDqogcVJ"
],
"type": "string"
},
"name": {
"description": "Name of the project",
"examples": [
"My Video Project"
],
"type": "string"
},
"slug": {
"description": "Slug is the slug for the project.",
"examples": [
"my-video-project"
],
"type": "string"
},
"storage_id": {
"description": "StorageId identifier where project files are stored",
"examples": [
"stor_chunkify_S1cce6120E56e7Tu9ioP09Nhjk1"
],
"type": "string"
}
},
"required": [
"id",
"name",
"slug",
"storage_id",
"created_at"
],
"type": "object"
}
```
```json #/components/schemas/ResponseErrorValidation
{
"properties": {
"error": {
"properties": {
"code": {
"const": 400,
"description": "Code is the HTTP status code",
"examples": [
400
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Invalid request parameters"
],
"type": "string"
},
"type": {
"const": "ValidationError",
"description": "Type indicates the error category",
"enum": [
"ValidationError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
]
}
```
```json #/components/schemas/ResponseErrorAuthentication
{
"description": "Error response",
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 401,
"description": "Code is the HTTP status code",
"examples": [
401
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Authentication error: invalid token or subscription inactive"
],
"type": "string"
},
"type": {
"const": "AuthenticationError",
"description": "Type indicates the error category",
"enum": [
"AuthenticationError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```
```json #/components/schemas/ResponseErrorForbidden
{
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 403,
"description": "Code is the HTTP status code",
"examples": [
403
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Unauthorized to perform this action"
],
"type": "string"
},
"type": {
"const": "ForbiddenError",
"description": "Type indicates the error category",
"enum": [
"ForbiddenError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
]
}
```
```json #/components/schemas/ResponseErrorTooManyRequests
{
"description": "Error response",
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 429,
"description": "Code is the HTTP status code",
"examples": [
429
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Rate limit exceeded"
],
"type": "string"
},
"type": {
"const": "TooManyRequestsError",
"description": "Type indicates the error category",
"enum": [
"TooManyRequestsError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```