v1

latestOpenAPI 3.0.02026-08-04891301.4 MB

Update a team

Updates one or more attributes of the team identified by team. Only the fields you provide are changed; omitted fields are left as-is.

To replace the team's profile picture, supply the profile_picture object with base64-encoded image data. The previous picture is deleted after the new one is successfully uploaded. When app is present, the caller must hold the corresponding app scope. The caller must be a team owner or org admin.

patch/api/v1/teams/{team}

Path parameters

teamstring required

Team ID (team_...) of the team to update.

Request body

descriptionstring

New human-readable description of the team's purpose.

metadataobject

Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.

namestring

New display name for the team.

Example request

{
  "acl": {
    "add": [
      {
        "actions": [
          "read",
          "write"
        ],
        "principal": "string",
        "principal_type": "user"
      }
    ],
    "grants": [
      {
        "actions": [
          "read",
          "write"
        ],
        "principal": "string",
        "principal_type": "user"
      }
    ],
    "remove": [
      {
        "principal": "string",
        "principal_type": "user"
      }
    ]
  },
  "description": "An example description.",
  "metadata": {
    "key": "value"
  },
  "name": "Example Name",
  "profile_picture": {
    "data": "string",
    "filename": "string",
    "mime_type": "application/json"
  }
}

Response

Successful response

appstring

ID of the developer application this team belongs to (dap_...). null if the team is not scoped to an app.

badgesobject

Aggregated badge counts for the team, keyed by category. null when badge data is not loaded.

created_atstring date-time

When this team was created (ISO 8601).

descriptionstring

Human-readable description of the team's purpose. null if not set.

idstring required

Team ID (tem_...).

membership_statusstring

The authenticated viewer's role on this team. One of "owner", "admin", or "member". null if the viewer is not a member.

metadataobject

Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.

namestring

Display name of the team.

orgstring

ID of the organization this team belongs to (org_...). null if the team is not org-scoped.

sandboxstring

ID of the developer sandbox this team is scoped to (dsb_...). null outside sandbox contexts.

slugstring

URL-safe slug for the team, derived from the team name. null if not set.

updated_atstring date-time

When this team was last updated (ISO 8601).

Example response

{
  "acl": {
    "add": [
      {
        "actions": [
          "read",
          "write"
        ],
        "principal": "string",
        "principal_type": "user"
      }
    ],
    "grants": [
      {
        "actions": [
          "read",
          "write"
        ],
        "principal": "string",
        "principal_type": "user"
      }
    ],
    "remove": [
      {
        "principal": "string",
        "principal_type": "user"
      }
    ]
  },
  "app": "dap_0aBcDeFgHiJkLmNoPqRsTu",
  "badges": {},
  "created_at": "2024-01-01T00:00:00Z",
  "description": "An example description.",
  "id": "tem_0aBcDeFgHiJkLmNoPqRsTu",
  "membership_status": "member",
  "metadata": {
    "key": "value"
  },
  "name": "Example Name",
  "org": "org_0aBcDeFgHiJkLmNoPqRsTu",
  "sandbox": "dsb_0aBcDeFgHiJkLmNoPqRsTu",
  "slug": "example-slug",
  "updated_at": "2024-01-01T00:00:00Z"
}