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

# Post space billingrow countrefresh

> Recount row usage for a space and stream progress via SSE

Required token scopes: `space|update`



## OpenAPI

````yaml /swagger.json post /space/{spaceId}/billing/row-count/refresh
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /space/{spaceId}/billing/row-count/refresh:
    post:
      tags:
        - billing
        - usage
      description: |-
        Recount row usage for a space and stream progress via SSE

        Required token scopes: `space|update`
      parameters:
        - schema:
            type: string
          required: true
          name: spaceId
          in: path
      responses:
        '200':
          description: SSE stream with per-table progress and the final row count detail
          content:
            text/event-stream:
              schema:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        enum:
                          - progress
                      completed:
                        type: number
                      total:
                        type: number
                      baseName:
                        type: string
                      tableName:
                        type: string
                    required:
                      - id
                      - completed
                      - total
                  - type: object
                    properties:
                      id:
                        type: string
                        enum:
                          - done
                      detail:
                        type: object
                        properties:
                          bases:
                            type: array
                            items:
                              type: object
                              properties:
                                baseId:
                                  type: string
                                baseName:
                                  type: string
                                isBaseInTrash:
                                  type: boolean
                                activeRowCount:
                                  type: number
                                trashRowCount:
                                  type: number
                                totalRowCount:
                                  type: number
                              required:
                                - baseId
                                - baseName
                                - isBaseInTrash
                                - activeRowCount
                                - trashRowCount
                                - totalRowCount
                          totalActiveRowCount:
                            type: number
                          totalTrashRowCount:
                            type: number
                          totalRowCount:
                            type: number
                        required:
                          - bases
                          - totalActiveRowCount
                          - totalTrashRowCount
                          - totalRowCount
                      calibratedAt:
                        type: string
                      fromCache:
                        type: boolean
                    required:
                      - id
                      - detail
                  - type: object
                    properties:
                      id:
                        type: string
                        enum:
                          - error
                      message:
                        type: string
                    required:
                      - id
                      - message
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/space/%7BspaceId%7D/billing/row-count/refresh \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/space/%7BspaceId%7D/billing/row-count/refresh';

            const options = {method: 'POST', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/space/%7BspaceId%7D/billing/row-count/refresh',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("POST",
            "/api/space/%7BspaceId%7D/billing/row-count/refresh",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````