Endpoints:
- Get message types
- Get a message type
- Create a message type
- Update a message type
- Destroy a message type
GET /buckets/1/categories.json
will return a list of all the message types in the project with an ID of1
.
[
{
"id": 823758531,
"name": "Announcement",
"icon": "📢",
"created_at": "2017-03-28T15:25:09.455Z",
"updated_at": "2017-03-28T15:25:09.455Z"
},
{
"id": 823758530,
"name": "Update",
"icon": "❤️",
"created_at": "2017-03-28T15:25:09.450Z",
"updated_at": "2017-03-28T15:25:09.450Z"
}
]
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/buckets/1/categories.json
GET /buckets/1/categories/2.json
will return the message type with ID2
in the project with ID1
.
{
"id": 823758531,
"name": "Announcement",
"icon": "📢",
"created_at": "2017-03-28T15:25:09.455Z",
"updated_at": "2017-03-28T15:25:09.455Z"
}
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/buckets/1/categories/2.json
POST /buckets/1/categories.json
creates a new message type in the project with ID1
.
Required parameters: name
and icon
for the new message type.
This endpoint will return 201 Created
with the current JSON representation of the message type if the creation was a success. See the Get a message type endpoint for more info on the payload.
{
"name": "Announcement",
"icon": "📢"
}
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"Announcement","icon": "📢"}' \
https://3.basecampapi.com/$ACCOUNT_ID/buckets/1/categories.json
PUT /buckets/1/categories/2.json
allows changing the message type with an ID of2
in the project with ID1
.
This endpoint will return 200 OK
with the current JSON representation of the message type if the update was a success. See the Get a message type endpoint for more info on the payload.
{
"name": "Quick Update",
"icon": "📢"
}
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"Quick Update","icon":"📢"}' -X PUT \
https://3.basecampapi.com/$ACCOUNT_ID/buckets/1/categories/2.json
DELETE /buckets/1/categories/2.json
will delete the message type with an ID of2
in the project with ID1
.
No parameters required. Returns 204 No Content
if successful.
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -X DELETE \
https://3.basecampapi.com/$ACCOUNT_ID/buckets/1/categories/2.json