Create a new API


POST/api/v1/{APP_ID}/{API_KEY}/create

Create API

This endpoint creates a new API in SheetDB for an existing Google Spreadsheet. Before using this endpoint, make sure that the Google Spreadsheet already exists in your account and you have permissions to it.

Required attributes

  • Name
    url
    Type
    string
    Description

    A string containing the URL of the Google Spreadsheet for which the new API will be created.

Optional attributes

  • Name
    permissions
    Type
    string
    Description

    A comma-separated list of permissions to enable for the API. If not provided, the following permissions are enabled by default: create, read, update, delete, search. Available permissions:

    • create: allows creating new rows
    • read: allows reading existing rows
    • update: allows updating existing rows
    • delete: allows deleting existing rows
    • search: allows searching for rows
    • tabs_create: allows creating new tabs
    • tabs_delete: allows deleting existing tabs

    Example: "create,tabs_create" will only allow creating new rows and tabs.

JSON Response

{
    "success": true,
    "name": "Test name",
    "id": "xxxxxxxxxxxxx",
    "url": "https://sheetdb.io/api/v1/xxxxxxxxxxxxx"
}


POST/api/v1/{APP_ID}/{API_KEY}/create/json

Create API with JSON

This endpoint creates a new API in SheetDB based on provided JSON data. The API will create a new Google Spreadsheet with the JSON data, then generate the API for the newly created Spreadsheet. Before using this endpoint, ensure that the JSON data is properly formatted and available at url.

Required attributes

  • Name
    url
    Type
    string
    Description

    A string containing the URL of the JSON data to be used for creating the Google Spreadsheet and the new API.

Optional attributes

  • Name
    title
    Type
    string
    Description

    A string representing the desired name for both the API and the associated Google Spreadsheet.

  • Name
    permissions
    Type
    string
    Description

    A comma-separated list of permissions to enable for the API. If not provided, the following permissions are enabled by default: create, read, update, delete, search. Available permissions:

    • create: allows creating new rows
    • read: allows reading existing rows
    • update: allows updating existing rows
    • delete: allows deleting existing rows
    • search: allows searching for rows
    • tabs_create: allows creating new tabs
    • tabs_delete: allows deleting existing tabs

    Example: "create,tabs_create" will only allow creating new rows and tabs.