Help

Unable to create new table in existing base using API

2847 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Rutger
6 - Interface Innovator
6 - Interface Innovator

Hi All, 

I would like to use the Airtable API to create a new table in an existing base. I've tried using Python/ PyAirtable as well as https requests via Postman. The API reference uses the following:

https://api.airtable.com/v0/meta/bases/{baseId}/tables 

However, the last bit seemed rather strange to me plus I'm getting the following error:

 

{
    "error": {
        "type": "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND",
        "message": "Invalid permissions, or the requested model was not found. Check that your token has the required permissions and that the model names and/or ids are correct."
    }
}

 

I'm using a personal token, with the required scopes (i.e. schema.bases:write)

Screenshot 2022-12-08 at 16.29.16.png

And the following payload (copied from the example):

 

{
    "description": "A to-do list of places to visit",
    "fields": [
      {
        "description": "Name of the apartment",
        "name": "Name",
        "type": "singleLineText"
      },
      {
        "name": "Address",
        "type": "singleLineText"
      },
      {
        "name": "Visited",
        "options": {
          "color": "greenBright",
          "icon": "check"
        },
        "type": "checkbox"
      }
    ],
    "name": "Apartments"
  }

 

The token is added as Authorization: Bearer header in postman. 

and lastly, the content type setting: 

Rutger_0-1670513579024.png

Maybe I'm missing something obvious but why doesn't this post request work? Other post requests in the same base work fine (adding a record)

 

 

 

1 Reply 1
Rutger
6 - Interface Innovator
6 - Interface Innovator

To answer my own question. For some reason this particular section of the API uses a different URL. 

https://api.airtable.com/v0/meta/bases/

 

instead of

 

https://api.airtable.com/v0/