Teams

Resource Fields

Name Type Read-only Description
legacy_id string
title string
businesshour Business hours
member_count integer
created_at timestamp ISO-8601 Format
updated_at timestamp ISO-8601 Format

Metadata




 
 




Actions

Retrieve all teams

GET /api/v1/teams.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope users
Ordered by id (ascending)

Arguments

Name Type Mandatory Description
legacy_ids string The comma separated legacy ids

Response

    {
        "status": 200,
        "data": [
            {
    "id": 1,
    "legacy_id": null,

    "title": "Support",
    "businesshour": {
    "id": 1,

    "resource_type": "business_hour"

}
,
    "member_count": 4,
    "created_at": "2015-07-21T07:10:42+05:00",
    "updated_at": "2015-07-21T08:50:19+05:00",

    "resource_type": "team"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/teams/1"

}
        ],
        "resource": "team",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    }

Retrieve available teams

GET /api/v1/teams/availability.json

Information

Allowed for Admins & Owners
Scope users
Ordered by id (ascending)

Response

    {
        "status": 200,
        "data": [
            {
    "id": 1,
    "legacy_id": null,

    "title": "Support",
    "businesshour": {
    "id": 1,

    "resource_type": "business_hour"

}
,
    "member_count": 4,
    "created_at": "2015-07-21T07:10:42+05:00",
    "updated_at": "2015-07-21T08:50:19+05:00",

    "resource_type": "team"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/teams/1"

}
        ],
        "resource": "team",
        "total_count": 1
    }

Retrieve a team

GET /api/v1/teams/:id.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope users

Response

    {
        "status": 200,
        "data": {
    "id": 1,
    "legacy_id": null,

    "title": "Support",
    "businesshour": {
    "id": 1,

    "resource_type": "business_hour"

}
,
    "member_count": 4,
    "created_at": "2015-07-21T07:10:42+05:00",
    "updated_at": "2015-07-21T08:50:19+05:00",

    "resource_type": "team"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/teams/1"

},
        "resource": "team"
    }

Add a team

POST /api/v1/teams.json

Information

Allowed for Admins & Owners
Scope users

Parameters

Name Type Mandatory Description
legacy_id string
title string
businesshour_id integer

Response

    {
        "status": 201,
        "data": {
    "id": 1,
    "legacy_id": null,

    "title": "Support",
    "businesshour": {
    "id": 1,

    "resource_type": "business_hour"

}
,
    "member_count": 4,
    "created_at": "2015-07-21T07:10:42+05:00",
    "updated_at": "2015-07-21T08:50:19+05:00",

    "resource_type": "team"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/teams/1"

},
        "resource": "team"
    }

Bulk add teams

POST /api/v1/bulk/teams.json

Information

Allowed for Admins & Owners
Scope users

You can insert a maximum of 200 teams at a time

Parameters

Name Type Mandatory Description
teams array
Array of teams to be inserted

Arguments

Name Type Mandatory Description
partial_import boolean By default, even if a single record is invalid, the entire batch is dropped. However, if this parameter is set to true, all the records with no validation errors will be inserted while the invalid records will be returned back.

Request

curl -X POST https://brewfictus.kayako.com/api/v1/bulk/teams \
    -d '{"teams":[{"title" : "Team1"},{"title" : "Team2", "legacy_id" : "legacy_101"}]}' \
    -H "Content-Type: application/json"

Response

    {
        "status": 202,
        "data": {
    "id": 1,
    "status": "PENDING",
    "created_at": "2015-07-30T06:45:25+05:00",
    "updated_at": "2015-07-30T06:45:25+05:00",
    "resource_type": "bulk_job",
    "resource_url": "https://brewfictus.kayako.com/api/v1/jobs/1"
}
,
        "resource": "job"
    }

Update a team

PUT /api/v1/teams/:id.json

Information

Allowed for Admins & Owners
Scope users

Parameters

Name Type Mandatory Description
title string
businesshour_id integer

Response

    {
        "status": 200,
        "data": {
    "id": 1,
    "legacy_id": null,

    "title": "Support",
    "businesshour": {
    "id": 1,

    "resource_type": "business_hour"

}
,
    "member_count": 4,
    "created_at": "2015-07-21T07:10:42+05:00",
    "updated_at": "2015-07-21T08:50:19+05:00",

    "resource_type": "team"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/teams/1"

},
        "resource": "team"
    }

Delete a team

DELETE /api/v1/teams/:id.json

Information

Allowed for Admins & Owners
Scope users

Response

{
    "status": 200
}

Delete teams

DELETE /api/v1/teams.json

Information

Allowed for Admins & Owners
Scope users

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Response

{
    "status": 200,
    "total_count": 2
}

Members

Retrieve all members

GET /api/v1/teams/:id/members.json

Information

Allowed for Agents, Admins & Owners
Scope users
Ordered by id (descending)

Arguments

Name Type Mandatory Description
is_enabled boolean Filter enbled or disabled members

Response

    {
        "status": 200,
        "data": [




{
    "id": 1,

    "uuid": "11b60c25-c44c-47b8-9f48-56631cd7fa01",
    "full_name": "Simon Blackhouse",
    "legacy_id": null,
    "designation": "Community Manager",
    "is_enabled": true,
    "is_mfa_enabled": true,
    "role":







{
    "id": 2,

    "resource_type": "role"

},

    "avatar": "https://brewfictus.kayako.com/avatar/get/24ee2d81-ad95-5ae1-a07e-7ccedcdb70b8",
    "agent_case_access": "ALL",
    "organization_case_access": null,
    "organization": {
    "id": 1,

    "resource_type": "organization"

}
,
    "teams": [

    ],
    "emails": [
        {
    "id": 1,

    "resource_type": "identity_email"

}
    ],
    "phones": [




{
    "id": 1,

    "resource_type": "identity_phone"

}

    ],
    "twitter": [],
    "facebook": [],
    "external_identifiers": [],
    "addresses": [
        {
    "id": 1,

    "resource_type": "contact_address"

}

    ],
    "websites": [
        {
    "id": 1,

    "resource_type": "contact_website"

}
    ],
   "custom_fields": [
       {
           "field": {
    "id": 1,

    "resource_type": "user_field"

}
,
           "value": "Customer Success",
           "resource_type": "user_field_value"
       }
    ],
    "pinned_notes_count": 0,
    "locale": "en-us",
    "time_zone": null,
    "time_zone_offset": null,
    "greeting": null,
    "signature": null,
    "status_message": null,
    "last_seen_user_agent": null,
    "last_seen_ip": null,
    "last_seen_at": null,
    "last_active_at": null,
    "realtime_channel": "presence-0c1c9535b26b749f815a22cb459a4a8084be77b6ac9515751ef5a743b190bef3@v1_users_6",
    "presence_channel": "user_presence-281f395f6f51d031a6d3db3489906c98285191ebac41bb744f9323f61af63433@5c98cdaa58dd91ff1119a476e8b3e305d2906d3b",
    "password_updated_at": "2016-03-15T10:38:01+05:00",
    "avatar_updated_at": null,
    "last_logged_in_at": null,
    "last_activity_at": null,
    "created_at": "2016-03-15T10:38:01+05:00",
    "updated_at": "2016-03-15T10:38:01+05:00",




    "resource_type": "user"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/users/1"

}

        ],
        "resource": "user",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    }

Add a member

POST /api/v1/teams/:id/members.json

Information

Allowed for Admins & Owners
Scope users

Parameters

Name Type Mandatory Description
agent_ids integer

Response

    {
        "status": 201,
        "data": 



{
    "id": 1,

    "uuid": "11b60c25-c44c-47b8-9f48-56631cd7fa01",
    "full_name": "Simon Blackhouse",
    "legacy_id": null,
    "designation": "Community Manager",
    "is_enabled": true,
    "is_mfa_enabled": true,
    "role":







{
    "id": 2,

    "resource_type": "role"

},

    "avatar": "https://brewfictus.kayako.com/avatar/get/24ee2d81-ad95-5ae1-a07e-7ccedcdb70b8",
    "agent_case_access": "ALL",
    "organization_case_access": null,
    "organization": {
    "id": 1,

    "resource_type": "organization"

}
,
    "teams": [

    ],
    "emails": [
        {
    "id": 1,

    "resource_type": "identity_email"

}
    ],
    "phones": [




{
    "id": 1,

    "resource_type": "identity_phone"

}

    ],
    "twitter": [],
    "facebook": [],
    "external_identifiers": [],
    "addresses": [
        {
    "id": 1,

    "resource_type": "contact_address"

}

    ],
    "websites": [
        {
    "id": 1,

    "resource_type": "contact_website"

}
    ],
   "custom_fields": [
       {
           "field": {
    "id": 1,

    "resource_type": "user_field"

}
,
           "value": "Customer Success",
           "resource_type": "user_field_value"
       }
    ],
    "pinned_notes_count": 0,
    "locale": "en-us",
    "time_zone": null,
    "time_zone_offset": null,
    "greeting": null,
    "signature": null,
    "status_message": null,
    "last_seen_user_agent": null,
    "last_seen_ip": null,
    "last_seen_at": null,
    "last_active_at": null,
    "realtime_channel": "presence-0c1c9535b26b749f815a22cb459a4a8084be77b6ac9515751ef5a743b190bef3@v1_users_6",
    "presence_channel": "user_presence-281f395f6f51d031a6d3db3489906c98285191ebac41bb744f9323f61af63433@5c98cdaa58dd91ff1119a476e8b3e305d2906d3b",
    "password_updated_at": "2016-03-15T10:38:01+05:00",
    "avatar_updated_at": null,
    "last_logged_in_at": null,
    "last_activity_at": null,
    "created_at": "2016-03-15T10:38:01+05:00",
    "updated_at": "2016-03-15T10:38:01+05:00",




    "resource_type": "user"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/users/1"

}
,
        "resource": "user"
    }

Delete a member

DELETE /api/v1/teams/:id/members.json

Information

Allowed for Admins & Owners
Scope users

Arguments

Name Type Mandatory Description
agent_id integer

Response

{
    "status": 200
}

Delete members

DELETE /api/v1/teams/:id/members.json

Information

Allowed for Admins & Owners
Scope users

Arguments

Name Type Mandatory Description
agent_ids string
The comma separated agent ids

Response

{
    "status": 200,
    "total_count": 2
}