Create project
POST
https://api.catenda.com/v2/orgs/{organization-id}/projects
Path Parameters
- organization-idstringrequiredDescription
Body Parameters
- bodyobjectrequired
- descriptionstringrequiredExampleDescription
- namestringrequiredExampleDescription
Responses
200
- projectDescription
- createdAtstringExampleDescription
- descriptionstringExampleDescription
- idstringExampleDescription
- imageUrlstringExampleDescription
- namestringExampleDescription
- owneruserDescription
- idstringExampleDescription
- namestringExampleDescription
- usernamestringExampleDescription
- emailstringExampleDescription
- createdAtstringExampleDescription
- avatarUrlstringExampleDescription
- typestring<user | organization | team>ExampleDescription
- siteLocationobjectDescription
- longitudestringExampleDescription
- latitudestringExampleDescription
- updatedAtstringExampleDescription
curl
curl --request POST \
--url https://api.catenda.com/v2/orgs/{organization-id}/projects \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"description": "Project description",
"name": "Project name"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"description": "Project description",
"name": "Project name"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.catenda.com/v2/orgs/{organization-id}/projects", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.catenda.com/v2/orgs/{organization-id}/projects")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"description": "Project description",
"name": "Project name"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.catenda.com/v2/orgs/{organization-id}/projects"
payload = json.dumps({
"description": "Project description",
"name": "Project name"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"createdAt": "2016-09-26T14:45:05.000Z",
"description": "Project description",
"id": "af2d8af0fa54465b89bf26dd3d92cfd0",
"imageUrl": "https://api.catenda.com/v2/projects/67551168422040148d8ae198a321494d/image",
"name": "Project name",
"owner": {
"id": "524809076a694255b989d236517a55da",
"name": "John Doe",
"username": "[email protected]",
"email": "[email protected]",
"createdAt": "2016-09-20T14:55:22.000Z",
"avatarUrl": "https://api.catenda.com/v2/avatar/397t0ccd8f74516096c738de15dc6512",
"type": "user"
},
"siteLocation": {
"longitude": 8.26,
"latitude": 6.46
},
"updatedAt": "2016-09-26T14:45:40.000Z"
}Add a new project.
The current user must be an owner of the organization.
The project will be owned by the organization and count towards the owners project limit.