Adds a new project
POST
/projectsAdds a new project
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, ProjectsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new ProjectsApi(config);
const result = await api.createProject({ "projectCreatePayload": { "name": "Checkout smoke tests", "company": 123 }});console.log(result);curl --request POST \ "https://api.testcollab.io/projects?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "id": 123, "name": "example", "description": "example", "importUsers": 123, "issueManagerProfile": 123, "importIssueManagerSettings": 123, "company": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
id |
number | No | — |
name |
string | Yes | — |
description |
string | No | — |
importUsers |
number | No | Project ID to import users from (only allowed at the time of project create) |
issueManagerProfile |
number | No | Issue Manager Profile ID for the desired integration |
importIssueManagerSettings |
number | No | Project ID to import issue manager settings from (only allowed at the time of project create) |
company |
number | Yes | Company ID |
Response
Section titled “Response”200 — Created Project
| Field | Type | Required | Description |
|---|---|---|---|
id |
number | Yes | — |
name |
string | Yes | — |
description |
string | No | — |
archived |
boolean | Yes | — |
team |
Array of Project User Minified | No | — |
activity |
string | No | — |
created_at |
string | Yes | — |
updated_at |
string | Yes | — |
is_sample |
boolean | No | Indicates that the project is a sample project or not |
{ "id": 123, "name": "example", "description": "example", "archived": true, "team": [], "activity": "example", "created_at": "example", "updated_at": "example", "is_sample": true}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |