> ## Documentation Index
> Fetch the complete documentation index at: https://help.statisfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh a Microsoft Teams team

> Reads the team's channels and members again, and its messages of the last `days` days as a run (what is already stored is skipped): 202 scheduled. One Teams run at a time, for any team: while one is in flight the answer is 200 already_running with that run, and nothing is read for this team. A refresh within 15 minutes after a completed run is a 409 with Retry-After. A team without Statisfy, or a connection Microsoft refused, is a 409; a 422 when Microsoft refuses Statisfy during the call. Calls Microsoft Graph: a 502 when Microsoft fails or cannot be reached, a 503 (with Retry-After when Microsoft sends one) while it throttles Statisfy, a 500 when Statisfy's own Microsoft sign-in fails.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/integrations/microsoft_teams/teams/{team_id}/refresh
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/microsoft_teams/teams/{team_id}/refresh:
    post:
      tags:
        - integrations
      summary: Refresh a Microsoft Teams team
      description: >-
        Reads the team's channels and members again, and its messages of the
        last `days` days as a run (what is already stored is skipped): 202
        scheduled. One Teams run at a time, for any team: while one is in flight
        the answer is 200 already_running with that run, and nothing is read for
        this team. A refresh within 15 minutes after a completed run is a 409
        with Retry-After. A team without Statisfy, or a connection Microsoft
        refused, is a 409; a 422 when Microsoft refuses Statisfy during the
        call. Calls Microsoft Graph: a 502 when Microsoft fails or cannot be
        reached, a 503 (with Retry-After when Microsoft sends one) while it
        throttles Statisfy, a 500 when Statisfy's own Microsoft sign-in fails.
      operationId: integrations_microsoft_teams_refresh_team
      parameters:
        - description: >-
            The team's id (its Microsoft Entra group id), as GET /teams returns
            it
          in: path
          name: team_id
          required: true
          schema:
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                days:
                  default: 30
                  description: Read the messages of this many days back
                  maximum: 90
                  minimum: 1
                  title: Days
                  type: integer
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationRunStarted'
          description: Successful Response
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationRunStarted'
          description: Accepted
      security:
        - HTTPBearer: []
components:
  schemas:
    IntegrationRunStarted:
      properties:
        message:
          title: Message
          type: string
        run_id:
          description: The new run, or the one already in flight
          title: Run Id
          type: integer
        started_at:
          format: date-time
          title: Started At
          type: string
        status:
          description: >-
            scheduled (202): the run starts now; already_running (200): a run of
            this subtype is in flight
          enum:
            - scheduled
            - already_running
          title: Status
          type: string
      required:
        - status
        - run_id
        - started_at
        - message
      title: IntegrationRunStarted
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.