Skip to main content

Create Fields

This text provides an example of how to call Create fields interface.

Example: create fields

Suppose you have a channel sales inventory summary table and you want to create a field in it.

Log action - Example datasheet

Your action steps below:

  1. Get your API Token.(How to get it)

  2. Get your Space ID.(How to get it)

  3. Get the ID of the datasheet.(How to get it)

  4. Open the terminal on your computer and execute the following code to send a query request to the server (Assuming spaceId is spcjXzqVrjaP3,datasheetId is dstNiC6R9MryevVaCQ) :

    curl -X POST \
    "https://aitable.ai/fusion/v1/spaces/spcjXzqVrjaP3/datasheets/dstNiC6R9MryevVaCQ/fields" \
    -H "Authorization: Bearer {Your API Token}" \
    -H 'Content-Type: application/json' \
    -d '{
    "type": "SingleText",
    "name": "Title",
    "property": {
    "defaultValue": "Default value"
    }
    }'
  5. The server returns the following JSON packets, below the "data" is all created fields:

    For the meaning of each parameter in the response, please check the API Reference

       {
    "success": true,
    "code": 200,
    "message": "SUCCESS",
    "data": {
    "id": "fldupsvkR2ATB",
    "name": "Title"
    }
    }