POST
/
db
/
insert
JavaScript
import Worqhat from 'worqhat';

const client = new Worqhat({
  apiKey: 'My API Key',
});

const response = await client.db.insertRecord({
  data: { name: 'John Doe', email: 'john@worqhat.com' },
  table: 'users',
});

console.log(response.data);
{
  "success": true,
  "data": {},
  "message": "Data inserted successfully"
}

Authorizations

Authorization
string
header
required

API key authentication. Format - "Bearer YOUR_API_KEY"

Body

application/json
table
string
required

Table name to insert into

Example:

"users"

data
object
required

Data to insert

Example:
{
"name": "John Doe",
"email": "john@worqhat.com"
}

Response

Data inserted successfully

success
boolean
Example:

true

data
object
message
string
Example:

"Data inserted successfully"