Apollo API Documentation

Workgroups API calls


Get workgroups

GET /workgroups

Returns a collection of groups.

Response

{
	"groups":[
		{
			"id":"65987892",
			"name":"A group",
			"users":["84334887","90825945"]
		},
		{
			"id":"36218238",
			"name":"Another group",
			"users":["84334887","51797471","9483214"]
		},
		...
	]
}

Get workgroup

GET /workgroups/#{id}

Returns a single group and the users associated with it.

Response

{
	"group":{
		"id":"65987892",
		"name":"A group",
		"users":["84334887","90825945"]
	}
}

Create workgroup

POST /workgroups

Creates a new group.

Request

{
	"group":{
		"name":"A group",
		"users":["84334887","90825945"]
	}
}

Response

Returns HTTP status code 201 (“Created”) on success. The response contain the new group ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.

{
	"workgroup-id":"56253586"
}

Update workgroup

PUT /workgroups/#{id}

Updates an existing workgroups identified by its integer ID. To remove a user from the group prefix his ID with a “-”.

Request

{
	"group":{
		"name":"Group name updated",
		"users":["-84334887","90800945"]
	}
}

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.


Destroy workgroup

DELETE /workgroups/#{id}

Deletes the group identified by its integer ID. Note that you cannot delete workgroups associated with a contact or a note.

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.