Teams

As the name suggests, teams are a core part of our platform — the very foundation of our tenancy is built around teams, which encompass all users. On this page, we'll explore the different team endpoints you can use to manage teams programmatically. We'll look at how to query, create, update, and delete teams.

The Team model

The team model contains all the information about your teams, such as their name, users, and structure. It also contains references to the associated users, organization, along with details about when the team was created and last updated on the platform.

Properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the team.

  • Name
    parent_team_id
    Type
    integer
    Description

    The unique identifier of the parent team.

  • Name
    name
    Type
    integer
    Description

    The name of the team.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the team was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the team was last updated on the platform.


GET/v3/teams

List all the teams

This endpoint allows you to retrieve a paginated list of all your teams. By default, a maximum of ten teams are shown per page.

Optional attributes

  • Name
    page
    Type
    integer
    Description

    Number of the page to display.

  • Name
    filter
    Type
    integer
    Description

    Narrow your search by using filter from JSON:API norms
    Allowed filters: name

  • Name
    include
    Type
    integer
    Description

    Include some extra relationships to your search from JSON:API norms
    Allowed include: users

Request

GET
/v3/teams
curl -G https://api.bx.feedier.com/v3/teams \
    -H "Authorization: Bearer {token}" \
    -d '{"include": ["users"]}'

Response

{
    "data": [
        {
            "id": 2,
            "name": "Primary team",
            "users": [
                {
                    "id": 3,
                    "name": "Aurelio Montoya",
                    "email": "xevokikxiw-7354@yopmail.com",
                    "role": "user",
                    "primary_team_id": 4,
                    "team_id": 4,
                    "created_at": "2021-06-15T09:30:10.000000Z",
                    "updated_at": "2021-06-16T11:42:55.000000Z"
                }
            ],
            "created_at": "2020-01-28T13:50:20.000000Z",
            "updated_at": "2020-01-28T13:50:23.000000Z"
        },
        {
            "id": 4,
            // ...
        },
    ],
    "links": {
        "first": "https://api.bx.feedier.com/v3/teams?page=1",
        "last": "https://api.bx.feedier.com/v3/teams?page=2",
        "prev": null,
        "next": "https://api.bx.feedier.com/v3/teams?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            // ...
        ],
        "path": "https://api.bx.feedier.com/v3/teams",
        "per_page": 10,
        "to": 10,
        "total": 15
    }
}

POST/v3/teams

Create a team

This endpoint allows you to create a new team into your organization.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the team.

Optional attributes

  • Name
    parent_team_id
    Type
    json
    Description

    The unique identifier of the parent team.

Request

POST
/v3/teams
curl https://api.bx.feedier.com/v3/teams \
    -H "Authorization: Bearer {token}" \
    -d name="Primary Team"

Response

{
    "id": 5,
    "name": "Primary Team",
    "created_at": "2024-08-09T07:25:53.000000Z",
    "updated_at": "2024-08-09T07:25:53.000000Z"
}

GET/v3/teams/:id

Retrieve a team

This endpoint allows you to retrieve a team by providing their unique identifier. Refer to the list at the top of this page to see which properties are included with contact objects.

Request

GET
/v3/teams/5
curl https://api.bx.feedier.com/v3/teams/5 \
    -H "Authorization: Bearer {token}"

Response

{
    "id": 5,
    "name": "Primary Team",
    "created_at": "2024-08-09T07:25:53.000000Z",
    "updated_at": "2024-08-09T07:25:53.000000Z"
}

PUT/v3/teams/:id

Update a team

This endpoint allows you to perform an update on a team.

Optional attributes

  • Name
    name
    Type
    integer
    Description

    The name of the team.

Request

PUT
/v3/teams/5
curl -X PUT https://api.bx.feedier.com/v3/teams/5 \
    -H "Authorization: Bearer {token}" \
    -d name="New Team Name"

Response

{
    "id": 5,
    "name": "New Team Name",
    "created_at": "2024-08-09T07:25:53.000000Z",
    "updated_at": "2024-08-09T07:28:54.000000Z"
}

Was this page helpful?