> ## 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.

# Claim a reward

> Submit a reward claim (e.g., social share)



## OpenAPI

````yaml /swagger.json post /space/{spaceId}/reward/claim
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: []
paths:
  /space/{spaceId}/reward/claim:
    post:
      tags:
        - reward
      summary: Claim a reward
      description: Submit a reward claim (e.g., social share)
      parameters:
        - schema:
            type: string
          required: true
          name: spaceId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    sourceType:
                      type: string
                      enum:
                        - socialShare
                    sourceMetaData:
                      type: object
                      properties:
                        platform:
                          type: string
                          enum:
                            - x
                            - linkedin
                        postUrl:
                          type: string
                        postId:
                          type: string
                        snapshotId:
                          type: string
                        content:
                          type: string
                        username:
                          type: string
                        followerCount:
                          type: number
                        verifyResult:
                          type: object
                          properties:
                            isValid:
                              type: boolean
                            errors:
                              type: array
                              items:
                                type: object
                                properties:
                                  message:
                                    type: string
                                  localization:
                                    type: object
                                    properties:
                                      i18nKey:
                                        type: string
                                      context:
                                        type: object
                                        additionalProperties:
                                          nullable: true
                                    required:
                                      - i18nKey
                                required:
                                  - message
                          required:
                            - isValid
                      required:
                        - platform
                        - postUrl
                  required:
                    - sourceType
                    - sourceMetaData
                - type: object
                  properties:
                    sourceType:
                      type: string
                      enum:
                        - appSumoActivation
                    sourceMetaData:
                      nullable: true
                  required:
                    - sourceType
      responses:
        '201':
          description: Reward claim submitted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  rewardStatus:
                    type: string
                    enum:
                      - pending
                      - approved
                      - rejected
                required:
                  - id
                  - rewardStatus
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/space/%7BspaceId%7D/reward/claim \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"sourceType":"socialShare","sourceMetaData":{"platform":"x","postUrl":"string","postId":"string","snapshotId":"string","content":"string","username":"string","followerCount":0,"verifyResult":{"isValid":true,"errors":[{"message":"string","localization":{"i18nKey":"string","context":{"property1":null,"property2":null}}}]}}}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/space/%7BspaceId%7D/reward/claim';

            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"sourceType":"socialShare","sourceMetaData":{"platform":"x","postUrl":"string","postId":"string","snapshotId":"string","content":"string","username":"string","followerCount":0,"verifyResult":{"isValid":true,"errors":[{"message":"string","localization":{"i18nKey":"string","context":{"property1":null,"property2":null}}}]}}}'
            };


            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/reward/claim',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            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.write(JSON.stringify({
              sourceType: 'socialShare',
              sourceMetaData: {
                platform: 'x',
                postUrl: 'string',
                postId: 'string',
                snapshotId: 'string',
                content: 'string',
                username: 'string',
                followerCount: 0,
                verifyResult: {
                  isValid: true,
                  errors: [
                    {
                      message: 'string',
                      localization: {i18nKey: 'string', context: {property1: null, property2: null}}
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


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


            payload =
            "{\"sourceType\":\"socialShare\",\"sourceMetaData\":{\"platform\":\"x\",\"postUrl\":\"string\",\"postId\":\"string\",\"snapshotId\":\"string\",\"content\":\"string\",\"username\":\"string\",\"followerCount\":0,\"verifyResult\":{\"isValid\":true,\"errors\":[{\"message\":\"string\",\"localization\":{\"i18nKey\":\"string\",\"context\":{\"property1\":null,\"property2\":null}}}]}}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/space/%7BspaceId%7D/reward/claim",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


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

````