Create project
Create a project with a billable default and its members.
POST https://cotlet.dev/api/v1/hubstaff/organizations/{organization_id}/projects
write
Creates a project and returns it. Only the name is required; add a description, a client, a billable default and members with roles viewer, user or manager in the same call. It reaches no one outside the members you list, and you can archive the project in Hubstaff in one click, so it does not ask for confirmation by default.
Parameters
| Name | Type | Description |
|---|---|---|
| organization_id integer required | integer | Organization ID from list_organizations. |
| name string required | string | Project name. |
| description string | string | Project description. |
| billable boolean | boolean | Whether time is billable by default. Default: true. |
| client_id integer | integer | Client to link; clients need a Teams or Enterprise plan. |
| members object[] | object[] | List of { user_id, role }, role is viewer, user or manager. |
Request
curl -X POST https://cotlet.dev/api/v1/hubstaff/organizations/412093/projects \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Website relaunch","billable":true,"members":[{"user_id":3011,"role":"user"},{"user_id":3014,"role":"manager"}]}' result = client.call("hubstaff", "create_project", {"organization_id":412093,"name":"Website relaunch","billable":True,"members":[{"user_id":3011,"role":"user"},{"user_id":3014,"role":"manager"}]}) const result = await cotlet.call('hubstaff', 'create_project', {"organization_id":412093,"name":"Website relaunch","billable":true,"members":[{"user_id":3011,"role":"user"},{"user_id":3014,"role":"manager"}]}); cotlet call hubstaff create_project --data '{"organization_id":412093,"name":"Website relaunch","billable":true,"members":[{"user_id":3011,"role":"user"},{"user_id":3014,"role":"manager"}]}' Example response
{
"project_id": 90417,
"name": "Website relaunch",
"status": "active",
"billable": true,
"members": [
{
"user_id": 3011,
"role": "user"
},
{
"user_id": 3014,
"role": "manager"
}
]
}