Overview
Teams are similar to a user account, they have their own username, dashboard and subscription, but a team can be managed by multiple users.
A user associated with a team can be a manager
or a user
. Managers have more privledges than a normal user and some API endpoints are limited to managers only.
Teams can be added to a collection as a collaborator by username
or user_id
(use the team id
for this).
- List teams
- Get a team
- Update a team
- List team members
- Add team member
- Update team member
- Remove team member
List teams
Endpoint
GET https://api.dropmark.com/v1/teams
Response
Status: 200 OK
[
{
"id": 2,
"created_at": "2015-01-15T12:00:18Z",
"name": "Acme Co.",
"username": "acme",
"avatar": "https://gravatar.com/avatar/rg123747b81669f6cff",
"custom_domain": null,
"plan": "team",
"plan_active": true,
"billing_email": "billing@example.com",
"user_kind": "manager"
}
]
Get a team
Endpoint
GET https://api.dropmark.com/v1/teams/:team_id
Response
Status: 200 OK
{
"id": 2,
"name": "Acme Co.",
"email": null,
"username": "acme",
"avatar": "https://gravatar.com/avatar/rg123747b81669f6cff",
"custom_domain": null,
"sort_by": null,
"sort_order": null,
"view_mode": "tile",
"labels": true,
"plan": "team",
"plan_active": true,
"plan_quantity": 1,
"billing_email": "billing@example.com",
"status": "active",
"created_at": "2016-08-03T16:27:46Z",
"feed_key": "5acea1f2b4021064a479",
"usage": {
"quota": 53687091200,
"used": 0
},
"user_kind": "manager",
"users": [{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"username": "demo",
"avatar": "https://gravatar.com/avatar/db450747b81669f6cea",
"custom_domain": null,
"plan": "free",
"status": "active",
"kind": "manager"
}]
}
Update a team
Note: Only team managers can use this endpoint.
Endpoint
PUT https://api.dropmark.com/v1/teams/:team_id
Input
Name | Type | Desc |
---|---|---|
billing_email |
String |
Where billing-related emails will be sent |
custom_domain |
String |
Custom domain name |
labels |
Boolean |
Set to false to hide collection labels |
name |
String |
Teams name |
sort_by |
String |
Collection’s sort: name , type , created_at , updated_at , last_accessed_at |
sort_order |
String |
Collection’s sort direction: asc , desc |
username |
String |
|
view_mode |
String |
Collection’s view mode: tile (default), shelf |
Example
{
"billing_email": "billing@example.com"
}
Response
Status: 200 OK
{
"id": 2,
"name": "Acme Co.",
"username": "acme",
"avatar": "https://gravatar.com/avatar/rg123747b81669f6cff",
"custom_domain": null,
"sort_by": "name",
"sort_order": "asc",
"view_mode": "tile",
"labels": true,
"plan": "team",
"plan_active": true,
"plan_quantity": 1,
"billing_email": "billing@example.com",
"status": "active",
"created_at": "2014-10-16T15:49:40Z",
"feed_key": "5acea1f2b4db0c52da75",
"usage": {
"quota": 53687091200,
"used": 0
}
}
List team members
Endpoint
GET https://api.dropmark.com/v1/teams/:team_id/users
Response
Status: 200 OK
[{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"username": "demo",
"avatar": "https://gravatar.com/avatar/db450747b81669f6cea",
"custom_domain": null,
"plan": "free",
"status": "active",
"kind": "manager"
}]
Add team member
Note: Only team managers can use this endpoint.
Endpoint
POST https://api.dropmark.com/v1/teams/:team_id/users
Input
Name | Type | Desc |
---|---|---|
id |
Integer |
User ID of team member to be added (required if email isn’t provided) |
email |
String |
Email of team member to be added (required if id isn’t provided) |
kind |
String |
Member kind: user (default) or manager |
Example
{
"user_id": 1,
"kind": "manager"
}
Response
Status: 201 Created
[{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"username": "demo",
"avatar": "https://gravatar.com/avatar/db450747b81669f6cea",
"custom_domain": null,
"plan": "free",
"status": "active",
"kind": "manager"
}]
Update team member
Note: Only team managers can use this endpoint.
Endpoint
PUT https://api.dropmark.com/v1/teams/:team_id/users/:user_id
Input
Name | Type | Desc |
---|---|---|
kind |
String |
Member kind: user or manager |
Example
{
"kind": "manager"
}
Response
Status: 200 OK
[{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"username": "demo",
"avatar": "https://gravatar.com/avatar/db450747b81669f6cea",
"custom_domain": null,
"plan": "free",
"status": "active",
"kind": "manager"
}]
Remove team member
Note: Only team managers can use this endpoint.
Endpoint
DELETE https://api.dropmark.com/v1/teams/:team_id/users/:user_id
Response
Status: 200 OK
{
"code": "deleted",
"message": "User removed from team"
}