Create a record
Create a record
Goal: add a row to any object (e.g. a contact). Time: ~5 min.
You need
- An API key (
crtk_live_…) with thecreate.<object>scope, or an admin JWT. - The object slug (e.g.
contacts) and the field slugs you want to set — find them in the Data Model or API reference.
Do it
The data body is keyed by field slug, not display name:
BASE=https://<workspace>.corteksa.com/api/v1
curl -X POST "$BASE/object/data/contacts" \
-H "X-Api-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": {
"name-8fk2": "Sara Ali",
"email-p0zx": "sara@acme.com",
"status-a1b2": "Lead"
}
}'{ "data": { "slug": "sara-ali-9d4e", "name": "Sara Ali", "status": "Lead" },
"message": "Record created" }Common issues
- 400 "Field X is required" — you keyed the body by name/label. Use the field slug.
- 403 — the key lacks
create.contacts. - Invalid
selectvalue — must match one of the field's allowed options.