# Create Tables and Fields via API on Baserow Hosted?

**URL:** https://community.baserow.io/t/create-tables-and-fields-via-api-on-baserow-hosted/8966
**Category:** Technical Help
**Created:** [December 25, 2024, 6:48pm UTC](https://community.baserow.io/t/create-tables-and-fields-via-api-on-baserow-hosted/8966 "2024-12-25T18:48:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ddsgad](https://community.baserow.io/letter_avatar_proxy/v4/letter/d/94ad74/32.png) [@ddsgad](https://community.baserow.io/u/ddsgad)
#### Post date: [December 25, 2024, 6:48pm UTC](https://community.baserow.io/t/create-tables-and-fields-via-api-on-baserow-hosted/8966/1 "2024-12-25T18:48:00Z")

</div>

I’m on the Baserow hosted plan. I am able to do all the regular API operations, but now we wanted to actually use the API to update certain table fields, so we can easily duplicate tables and values, without having to manually re-enter all the settings. So I took a look at this API: [Baserow API spec](https://api.baserow.io/api/redoc/) - I followed the directions to simply get the values for [Baserow API spec](https://api.baserow.io/api/redoc/#tag/Database-table-fields/operation/get_database_table_field) but I can’t get the authorization to work. I am usin the database token from the admin dashboard on the hosted baserow, and I’m assuming this is not the correct token to use. I think you need some sort of user JWT. How do you create this? Where is this? thanks.

---

<div class="post-metadata">

### Author: ![davide](https://community.baserow.io/user_avatar/community.baserow.io/davide/32/2425_2.png) [@davide](https://community.baserow.io/u/davide)
#### Post date: [December 30, 2024, 9:04am UTC](https://community.baserow.io/t/create-tables-and-fields-via-api-on-baserow-hosted/8966/2 "2024-12-30T09:04:08Z")

</div>

Hello @ddsgad,

we have some (slightly outdated) documentation here: [Backend API](https://baserow.io/docs/apis%2Frest-api).

Actually, the only difference (which I’ll fix) is that the documentation currently states:

> If you inspect the JSON response, you will notice a key named ‘token’.

and later:

> The token will be valid for 60 minutes.

However, Baserow now returns two tokens: `access_token` (valid for 10 minutes) and `refresh_token` (valid for 7 days).

The `access_token` is the token to use for all API calls to Baserow. The `refresh_token` is only used to refresh the `access_token` when it expires, by providing it as the payload to the `token_refresh` endpoint.

For simplicity, many users just log in again to get a new `access_token` and `refresh_token` each time. However, I wouldn’t recommend this practice, as it creates many sessions that are used for only a few calls. While this works for now, we might restrict this behavior in the future.
