团队

GET https://mybotsy.com/api/teams/
curl --request GET \
--url 'https://mybotsy.com/api/teams/' \
--header 'Authorization: Bearer {api_key}' \
参数 详细信息 说明
search 可选 字符串 搜索字符串
search_by 可选 字符串 您在哪个领域搜索。允许的值为:name。
datetime_field 可选 字符串 允许值:datetime, last_datetime
datetime_start 可选 字符串 过滤从此日期时间开始的结果。 Ymd H:i:s格式。
datetime_end 可选 字符串 筛选截至该日期时间的结果。 Ymd H:i:s格式。
order_by 可选 字符串 按什么字段对结果进行排序。允许的值为:team_id, datetime, last_datetime, name。
order_type 可选 字符串 结果的排序。允许的值为: ASC表示升序, DESC表示降序。
page 可选 整数 您想要结果的页码。默认为1 。
results_per_page 可选 整数 您希望每页有多少个结果。允许的值为:10, 25, 50, 100, 250, 500, 1000。默认为25 。
{
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "name": "Example team",
            "team_members": [
                {
                    "team_member_id": 1,
                    "user_email": "hello@example.com",
                    "access": {
                        "read": true,
                        "create": true,
                        "update": true,
                        "delete": false
                    },
                    "status": 1,
                    "datetime": "2026-10-31 00:00:08",
                    "last_datetime": null
                }
            ],
            "last_datetime": null,
            "datetime": "2026-10-31 00:00:08"
        }
    ],
    "meta": {
        "page": 1,
        "total_pages": 1,
        "results_per_page": 25,
        "total_results": 1
    },
    "links": {
        "first": "https://mybotsy.com/api/teams?page=1",
        "last": "https://mybotsy.com/api/teams?page=1",
        "next": null,
        "prev": null,
        "self": "https://mybotsy.com/api/teams?page=1"
    }
}
GET https://mybotsy.com/api/teams/{team_id}
curl --request GET \
--url 'https://mybotsy.com/api/teams/{team_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "name": "Example team",
        "team_members": [
            {
                "team_member_id": 1,
                "user_email": "hello@example.com",
                "access": {
                    "read": true,
                    "create": true,
                    "update": true,
                    "delete": false
                },
                "status": 1,
                "datetime": "2026-10-31 00:00:08",
                "last_datetime": null
            }
        ],
        "last_datetime": null,
        "datetime": "2026-10-31 00:00:08"
    }
}
POST https://mybotsy.com/api/teams
参数 详细信息 说明
name 必需 字符串 -
curl --request POST \
--url 'https://mybotsy.com/api/teams' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=My team' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "name": "My team",
        "team_members": [],
        "last_datetime": null,
        "datetime": "2026-10-31 00:00:08"
    }
}
POST https://mybotsy.com/api/teams/{team_id}
参数 详细信息 说明
name 可选 字符串 -
curl --request POST \
--url 'https://mybotsy.com/api/teams/{team_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=My new team name' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "name": "My new team name",
        "team_members": [
            {
                "team_member_id": 1,
                "user_email": "hello@example.com",
                "access": {
                    "read": true,
                    "create": true,
                    "update": true,
                    "delete": false
                },
                "status": 1,
                "datetime": "2026-10-31 00:00:08",
                "last_datetime": null
            }
        ],
        "last_datetime": "2026-10-31 00:00:08",
        "datetime": "2026-10-31 00:00:08"
    }
}
DELETE https://mybotsy.com/api/teams/{team_id}
curl --request DELETE \
--url 'https://mybotsy.com/api/teams/{team_id}' \
--header 'Authorization: Bearer {api_key}' \