Skip to content

Teams ​

Manage teams that group projects and users together. Every ShieldCI account has a personal team created on signup. Business and Enterprise plans can create additional shared teams with multiple members.

All endpoints require a valid Sanctum token. See Authentication for ability details.


List Teams ​

GET /api/v1/teams

Requires ability: read

Returns all teams the authenticated user belongs to, including their personal team.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Acceptapplication/jsonRecommended
bash
curl https://shieldci.com/api/v1/teams \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Accept: application/json"

Response ​

json
{
  "data": [
    {
      "id": 1,
      "name": "Jane's Team",
      "personal_team": true,
      "owner_id": 5,
      "member_count": 1,
      "project_count": 2,
      "created_at": "2026-01-05T12:00:00+00:00"
    },
    {
      "id": 3,
      "name": "Acme Corp",
      "personal_team": false,
      "owner_id": 5,
      "member_count": 4,
      "project_count": 7,
      "created_at": "2026-02-10T09:00:00+00:00"
    }
  ]
}
FieldTypeDescription
idintegerTeam ID - use in all team URLs
namestringTeam display name
personal_teambooleantrue if this is the user's automatically-created personal team
owner_idinteger|nullUser ID of the team owner
member_countintegerTotal number of team members
project_countintegerTotal number of projects in this team
created_atstring|nullISO 8601 creation timestamp

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks read ability or no active subscription

Create Team ​

POST /api/v1/teams

Requires ability: write

Creates a new shared team and switches the authenticated user's active context to it. The authenticated user becomes the team owner. Creating shared teams requires a Business or Enterprise plan.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Content-Typeapplication/jsonYes
FieldTypeRequiredDescription
namestringYesTeam name (max 255 characters)
bash
curl -X POST https://shieldci.com/api/v1/teams \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp"}'

Response ​

HTTP 201 Created

json
{
  "team": {
    "id": 3,
    "name": "Acme Corp",
    "personal_team": false,
    "owner_id": 5,
    "member_count": 1,
    "project_count": 0,
    "created_at": "2026-05-13T10:00:00+00:00"
  },
  "message": "Team created successfully."
}

Errors ​

StatusCondition
401Missing or invalid token
403Plan does not allow creating shared teams
422Validation failed - name missing or exceeds 255 characters

Get Team ​

GET /api/v1/teams/{team}

Requires ability: read

Returns the team's details and its full member list.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Acceptapplication/jsonRecommended
ParameterTypeDescription
teamintegerTeam ID (from data[].id in the list response)
bash
curl "https://shieldci.com/api/v1/teams/3" \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Accept: application/json"

Response ​

json
{
  "team": {
    "id": 3,
    "name": "Acme Corp",
    "personal_team": false,
    "owner_id": 5,
    "member_count": 2,
    "project_count": 5,
    "created_at": "2026-02-10T09:00:00+00:00"
  },
  "members": [
    {
      "id": 5,
      "name": "Jane Smith",
      "email": "jane@example.com",
      "avatar_url": null,
      "role": "owner",
      "joined_at": "2026-02-10T09:00:00+00:00"
    },
    {
      "id": 8,
      "name": "Bob Jones",
      "email": "bob@example.com",
      "avatar_url": "https://gravatar.com/...",
      "role": "member",
      "joined_at": "2026-03-01T11:00:00+00:00"
    }
  ]
}
FieldTypeDescription
idintegerUser ID - use in member management URLs
namestringDisplay name
emailstringEmail address
avatar_urlstring|nullAvatar URL
rolestring|nullTeam role: owner, admin, member, or readonly
joined_atstring|nullISO 8601 timestamp when the user joined the team

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks read ability or no active subscription
404Team not found or user is not a member

Update Team ​

PUT /api/v1/teams/{team}

Requires ability: write

Renames a team.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Content-Typeapplication/jsonYes
FieldTypeRequiredDescription
namestringYesNew team name (max 255 characters)
bash
curl -X PUT "https://shieldci.com/api/v1/teams/3" \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp Ltd"}'

Response ​

Returns the updated team in the same shape as the team object in Get Team.

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks permission to update this team
404Team not found
422Validation failed

Delete Team ​

DELETE /api/v1/teams/{team}

Requires ability: write

Permanently deletes a team. Cannot delete your personal team.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
bash
curl -X DELETE "https://shieldci.com/api/v1/teams/3" \
  -H "Authorization: Bearer shieldci_{token}"

Response ​

json
{
  "message": "Team deleted successfully."
}

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks permission to delete this team, or team is a personal team
404Team not found

Invite Member ​

POST /api/v1/teams/{team}/members

Requires ability: admin

Sends a team invitation email to the specified address. The invitation must be accepted by the recipient. Inviting someone who already has a pending invitation purges the old invitation and resends it.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Content-Typeapplication/jsonYes
FieldTypeRequiredDescription
emailstringYesEmail address to invite (max 255 characters)
rolestringYesRole to assign: admin, member, or readonly - cannot be owner
bash
curl -X POST "https://shieldci.com/api/v1/teams/3/members" \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Content-Type: application/json" \
  -d '{"email": "new@example.com", "role": "member"}'

Response ​

HTTP 201 Created

json
{
  "message": "Invitation sent to new@example.com."
}

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks admin ability or user lacks permission to invite members
404Team not found
422Email is already an active team member, role is owner, or email is invalid

Update Member Role ​

PUT /api/v1/teams/{team}/members/{user}

Requires ability: admin

Changes the role of an existing team member.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Content-Typeapplication/jsonYes
ParameterTypeDescription
teamintegerTeam ID
userintegerUser ID of the member to update (from members[].id in Get Team)
FieldTypeRequiredDescription
rolestringYesNew role: admin, member, or readonly - cannot be owner
bash
curl -X PUT "https://shieldci.com/api/v1/teams/3/members/8" \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Content-Type: application/json" \
  -d '{"role": "admin"}'

Response ​

json
{
  "message": "Member role updated to Admin."
}

Errors ​

StatusCondition
401Missing or invalid token
403Target user is the team owner; or you are trying to change your own role
404User is not a member of this team
422Role is invalid or set to owner

Remove Member ​

DELETE /api/v1/teams/{team}/members/{user}

Requires ability: admin

Removes a member from the team. Cannot remove the team owner or yourself (use account deletion to leave a team you own).

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
ParameterTypeDescription
teamintegerTeam ID
userintegerUser ID of the member to remove
bash
curl -X DELETE "https://shieldci.com/api/v1/teams/3/members/8" \
  -H "Authorization: Bearer shieldci_{token}"

Response ​

json
{
  "message": "Member removed from team."
}

Errors ​

StatusCondition
401Missing or invalid token
403Target is the team owner; or you are trying to remove yourself
404User is not a member of this team

Team Roles ​

RoleValuePermissions
OwnerownerFull access including billing and team deletion. Assigned at team creation; not assignable via API.
AdminadminCan manage projects and team members
MembermemberCan create and edit projects
Read OnlyreadonlyCan only view projects and reports