Create Project
Create a new project.
Request Body required
Project request body
The name of the project.
Your AI chat bot will greet the user with this question.
This is the base prompt what will be passed to the AI model. You can customize the chat bot's behavior by changing this.
If true, the project will be accessible to all users. Only mark it as true if you want to embed your chat bot to your website
If true, the project will show the resources after answering user's question.
- 200
- 400
- 401
- 403
- 426
- 500
successful operation
Schema
The unique identifier of the project
The name of the project.
Your AI chat bot will greet the user with this question.
This is the base prompt what will be passed to the AI model. You can customize the chat bot's behavior by changing this.
If true, the project will be accessible to all users. Only mark it as true if you want to embed your chat bot to your website
If true, the project will show the resources after answering user's question.
dataSources object[]
{
"id": "5f738671-0ccc-4d32-9b7a-ddab669ab799",
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true,
"dataSources": [
{
"id": "5f738671-0ccc-4d32-9b7a-ddab669ab799",
"projectId": "5f738671-0ccc-4d32-9b7a-ddab669ab799",
"name": "Magic AI website home page",
"status": "ready",
"sourceType": "file",
"summary": "string",
"characterCount": 1000
}
]
}
The specified parameter is invalid
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
Authentication information is missing or invalid
Response Headers
You don't have permission to access this resource
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
You need to upgrade your account to access this resource
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
An unexpected error occurred
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
POST /projects
Authorization
name: basicAuthtype: httpscheme: basic
Request
Request
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'
curl -L -X POST 'https://api.magicai.ai/v1/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "Sample Project",
"welcomeQuestion": "Hi, how can I help you?",
"systemPrompt": "string",
"isPublic": false,
"showResources": true
}'