Deleting Records

To delete a record, use the DELETE method on the /data/{record_id} endpoint.

DELETE https://{your-workspace-slug}.xata.sh/db/{db_branch_name}/tables/{table_name}/data/{record_id}

For example:

DELETE https://tutorial-ng7s8c.xata.sh/db/tutorial:main/tables/users/data/rec_c8hng2h26un90p8sr7k0

Upon successful deleting, the HTTP status code will be 204 No content. For more information about delete operations, please consult our API Reference from this page's sidebar.

Next Steps

Now that you have seen how to do the basic create, remove, update, and delete operations, you can check out the docs on using the free text search API, which is a new super power that Xata gives you.

You can also review the pages on getting data, updating data, inserting data. We've got guides for each of these operations.


Last modified 1 mo1 day ago