Skip to content

API Reference ​

Complete documentation for the Gola REST API.

Base URL: https://api.gola.work/api/

Contents ​


Conventions ​

Authentication ​

Every endpoint except POST /auth and GET /me requires a Sanctum bearer token:

Authorization: Bearer {token}
Accept: application/json

Tokens returned by POST /auth are account-wide and are not restricted to a single app. The API also accepts app-scoped tokens named appo_{appId}; these are issued to app memberships and only grant access to that specific app.

Path parameters ​

ParameterDescriptionExample
teamTeam slug (not the team id)8783c0c8
appApplication id8048f3e1
modelModel id01kwkwdm0skdcx5fv8pc63w780
dataRecord id01kwkwdm3hvv6b71cjy2c5n5dt
userUser id01jbv18r65gbnrcefvnr4ng4py

Response format ​

  • JSON is returned when Accept: application/json is sent.
  • Collections are wrapped in a data key unless the endpoint returns a paginator.
  • Failed validation returns HTTP 422 with { "message": "...", "errors": { ... } }.

Response codes ​

CodeMeaning
200Success
401Missing or invalid token, or invalid login credentials
403Authenticated, but not allowed to perform the action
404Team, app, model, user, or record not found
422Validation failed

Permissions ​

Access is evaluated through the team/app memberships and role permissions:

  • App access requires a teams_users membership for the app.
  • App owners (teams.user_id) bypass role permission checks.
  • Model and record visibility is additionally filtered by the model id and action stored in the role's meta array, for example 01kwkwdm0skdcx5fv8pc63w780_view.
  • Field-level access uses {roleIdx}_view and {roleIdx}_edit entries in the field's permissions array.

Endpoint Summary ​

MethodEndpointDescription
POST/authCreate an API token
GET/meCurrent user profile
GET/teamsList teams for the current user
POST/teamsCreate a team and associate it with the current user
POST/usersCreate a user account with email and password (alias: /user)
GET/team/{team}/appList apps (alias: /team/{team}/apps)
POST/team/{team}/appCreate an app (alias: /team/{team}/apps)
GET/team/{team}/app/{app}Show an app (alias: /team/{team}/apps/{app})
PUT, PATCH/team/{team}/app/{app}Update an app (alias: /team/{team}/apps/{app})
GET/team/{team}/app/{app}/userList app users
POST/team/{team}/app/{app}/userAdd a user to the app
DELETE/team/{team}/app/{app}/user/{user}Remove a user from the app
GET/team/{team}/app/{app}/modelList models
POST/team/{team}/app/{app}/modelCreate a model
GET/team/{team}/app/{app}/model/{model}Show a model
PUT, PATCH/team/{team}/app/{app}/model/{model}Update a model
GET/team/{team}/app/{app}/model/{model}/dataList records
POST/team/{team}/app/{app}/model/{model}/dataCreate a record
GET/team/{team}/app/{app}/model/{model}/data/{data}Show a record
POST/team/{team}/app/{app}/model/{model}/data/{data}/uploadUpload files to a file/image field
PUT, PATCH/team/{team}/app/{app}/model/{model}/data/{data}Update a record
DELETE/team/{team}/app/{app}/model/{model}/data/{data}Delete a record

Team deletion, app deletion, and model deletion are not exposed by this API.


Authentication ​

POST /auth ​

Authenticate with email and password to receive a bearer token. Any previously issued JWT token for the account is deleted before a new one is created.

Headers

Content-Type: application/json
Accept: application/json

Body

json
{
  "email": "user@example.com",
  "password": "your_password"
}

Response 200 Success

json
{
  "token": "1|abcdefghijklmnopqrstuvwxyz0123456789",
  "user": {
    "id": "01jbv18r65gbnrcefvnr4ng4py",
    "email": "user@example.com"
  }
}

cURL

bash
curl -X POST https://api.gola.work/api/auth \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your_password"
  }'

Errors

  • 401 — { "message": "Invalid login details" } when the email or password is incorrect.
  • 422 — email or password is missing.

User ​

GET /me ​

Retrieve the authenticated user's profile information.

Headers

Authorization: Bearer {token}
Accept: application/json

Response 200 Success

json
{
  "id": "01jbv18r65gbnrcefvnr4ng4py",
  "email": "user@example.com",
  "name": "John Doe"
}

cURL

bash
curl https://api.gola.work/api/me \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

Errors

  • 401 — the token is missing or invalid. The response body is an empty JSON array ([]).

POST /users ​

Create a new user account with an email and password. This endpoint is also available as POST /user and does not require a bearer token.

Headers

Content-Type: application/json
Accept: application/json

Body

json
{
  "email": "jane@example.com",
  "name": "Jane Doe",
  "password": "secret123"
}
FieldRequiredDescription
emailYesEmail address of the new user
nameNoDisplay name; defaults to the email address
passwordYesInitial password (minimum 8 characters)

Response 200 Success

json
{
  "id": "01jbv18r65gbnrcefvnr4ng4py",
  "name": "Jane Doe",
  "email": "jane@example.com",
  "token": "1|abcdefghijklmnopqrstuvwxyz0123456789"
}

cURL

bash
curl -X POST https://api.gola.work/api/users \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "email": "jane@example.com",
    "name": "Jane Doe",
    "password": "secret123"
  }'

Errors

  • 422 — email is missing/invalid or already exists, or password is shorter than 8 characters.

Teams ​

GET /teams ​

List all teams the authenticated user belongs to for the current application. Membership is read from teams_users and excludes removed memberships.

Headers

Authorization: Bearer {token}
Accept: application/json

Response 200 Success

json
{
  "data": [
    {
      "id": "01jcza1531n6tz8hbyrgmgtmfb",
      "name": "My Team",
      "slug": "8783c0c8"
    }
  ]
}

cURL

bash
curl https://api.gola.work/api/teams \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

POST /teams ​

Create a team and associate it with the authenticated user. A default application is created for the team and the user is added to it.

Headers

Authorization: Bearer {token}
Content-Type: application/json
Accept: application/json

Body

json
{
  "name": "My Team"
}
FieldRequiredDescription
nameYesTeam name

Response 200 Success

json
{
  "id": "01jcza1531n6tz8hbyrgmgtmfb",
  "name": "My Team",
  "slug": "8783c0c8",
  "app_id": "8048f3e1"
}

cURL

bash
curl -X POST https://api.gola.work/api/teams \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "My Team"
  }'

Errors

  • 401 — the token is missing or invalid.
  • 422 — name is missing.

Apps ​

GET /team/{team}/app ​

List all applications the authenticated user can access within the team.

This endpoint is also available as GET /team/{team}/apps.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.

Headers

Authorization: Bearer {token}
Accept: application/json

Response 200 Success

json
{
  "data": [
    {
      "id": "8048f3e1",
      "name": "My App",
      "role": 1
    }
  ]
}

role is the role index from the user's membership (teams_users.meta.role). It is the string "0" when no role has been assigned.

cURL

bash
curl https://api.gola.work/api/team/{team}/app \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

POST /team/{team}/app ​

Create an application within a team. This endpoint is also available as POST /team/{team}/apps. Only the team owner can create an app. The authenticated user is added to the new app.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.

Headers

Authorization: Bearer {token}
Content-Type: application/json
Accept: application/json

Body

json
{
  "name": "My App"
}
FieldRequiredDescription
nameYesApplication name

Response 200 Success

json
{
  "id": "8048f3e1",
  "name": "My App",
  "meta": {
    "roles": []
  }
}

cURL

bash
curl -X POST https://api.gola.work/api/team/{team}/app \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "My App"
  }'

Errors

  • 401 — the token is missing or invalid.
  • 403 — the authenticated user is not the team owner.
  • 404 — the team was not found.
  • 422 — name is missing.

GET /team/{team}/app/ ​

Retrieve a specific application within a team. The authenticated user must be a member of the team and of the app.

This endpoint is also available as GET /team/{team}/apps/{app}.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.

Response 200 Success

json
{
  "id": "8048f3e1",
  "name": "APP Name",
  "meta": {
    "roles": [
      {
        "idx": 1,
        "code": "6a479f71",
        "meta": [
          "01m5haktx1ykfqwg50zjd1q7x8_thread",
          "01m5haktx1ykfqwg50zjd1q7x8_view",
          "01m5haktx1ykfqwg50zjd1q7x8_viewa",
          "01m5haktx1ykfqwg50zjd1q7x8_edita",
          "01m5haktx1ykfqwg50zjd1q7x8_editas",
          "01m5haktx1ykfqwg50zjd1q7x8_del",
          "01m5haktx1ykfqwg50zjd1q7x8_reorder"
        ],
        "name": "Technician",
        "users": [],
        "users_roles": []
      },
      {
        "idx": 2,
        "code": "27b67202",
        "meta": [
          "01m5hakts5xf0w0n11nx8a4pw5_add",
          "01m5hakts5xf0w0n11nx8a4pw5_view",
          "01m5hakts5xf0w0n11nx8a4pw5_viewa"
        ],
        "name": "Manager",
        "users": [
          "user_a",
          "user_v",
          "user_va",
          "user_d",
          "user_ea",
          "user_e",
          "user_da"
        ],
        "users_roles": [1]
      }
    ]
  }
}

App Structure

FieldDescription
idApplication id
nameApp name
metaApp metadata; only roles is exposed here

App Role Structure

FieldTypeDescription
idxintegerRole index
codestringRole code used by sign-in/sign-up URLs
metaarrayPermissions in {modelId}_{action} form
namestringRole name
usersarrayUser-management permissions (user_*)
users_rolesarrayRole indices this role may assign or manage

Role permissions use the format {modelId}_{action}:

  • add — Add records
  • thread — Create discussions
  • view — View assigned records
  • viewa — View all records
  • edita — Edit all records
  • editas — Edit assigned records
  • del — Delete records
  • reorder — Reorder records

User-management permissions:

  • user_a — Add users
  • user_v — View added users
  • user_va — View all users
  • user_e — Edit added users
  • user_ea — Edit all users
  • user_d — Delete added users
  • user_da — Delete all users

cURL

bash
curl https://api.gola.work/api/team/{team}/app/{app} \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

PUT /team/{team}/app/ ​

Update an app. PATCH is accepted as an alias. Only the team owner can update an app.

This endpoint is also available as PUT|PATCH /team/{team}/apps/{app}.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.

Request Body

json
{
  "name": "App Name",
  "meta": {
    "roles": [
      {
        "idx": 1,
        "code": "27b67202",
        "name": "Technician",
        "meta": [
          "01m5haktx1ykfqwg50zjd1q7x8_view",
          "01m5haktx1ykfqwg50zjd1q7x8_viewa"
        ],
        "users": [],
        "users_roles": []
      },
      {
        "idx": 2,
        "name": "Manager",
        "meta": [
          "01m5hakts5xf0w0n11nx8a4pw5_add",
          "01m5hakts5xf0w0n11nx8a4pw5_view"
        ],
        "users": ["user_a", "user_v"],
        "users_roles": [1]
      }
    ]
  }
}

Body Fields

FieldRequiredDescription
nameNoNew app name
meta.rolesNoFull replacement of the app role list
meta.roles.*.idxNoRole index. When omitted, the next index after the highest supplied index is assigned
meta.roles.*.codeNoRole code. When omitted or empty, a random 8-character hex code is generated
meta.roles.*.nameYes (per role)Role name
meta.roles.*.metaNoPermission strings. Entries whose model id does not belong to this team and app are removed
meta.roles.*.usersNoUser-management permissions; defaults to []
meta.roles.*.users_rolesNoRole indices; values are cast to integers

When meta.roles is supplied it replaces the complete role list. Omitting meta.roles leaves the existing roles untouched.

Response 200 Success

json
{
  "id": "8048f3e1",
  "name": "App Name",
  "meta": {
    "roles": [
      {
        "idx": 1,
        "code": "27b67202",
        "name": "Technician",
        "meta": [
          "01m5haktx1ykfqwg50zjd1q7x8_view",
          "01m5haktx1ykfqwg50zjd1q7x8_viewa"
        ],
        "users": [],
        "users_roles": []
      }
    ]
  }
}

cURL

bash
curl -X PUT https://api.gola.work/api/team/{team}/app/{app} \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Updated Name"
  }'

Errors

  • 403 — the authenticated user is not the team owner.
  • 404 — the app does not belong to the team.
  • 422 — invalid body or a role without a name.

App Users ​

Manage the users that have access to an application. Each entry represents a membership between a user account and an app; removing an entry revokes that user's access to the app without deleting the user account.

The authenticated user must be a member of the app and have the relevant user permissions: user_a to add, user_v/user_va/user_a to list, and user_da (or user_d when they added the membership) to remove. App owners bypass these permission checks. If the app has a user limit configured in meta.app.billing.users, adding a user is rejected when the limit has been reached.

GET /team/{team}/app/{app}/user ​

List all users with access to the application.

Headers

Authorization: Bearer {token}
Accept: application/json

Response 200 Success

json
{
  "data": [
    {
      "id": "01jbv18r65gbnrcefvnr4ng4py",
      "name": "John Doe",
      "email": "john@example.com",
      "role": 1,
      "created_at": "2026-01-01T00:00:00.000000Z"
    }
  ]
}

cURL

bash
curl https://api.gola.work/api/team/{team}/app/{app}/user \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

POST /team/{team}/app/{app}/user ​

Add a user to the application. If an account with the given email does not exist, it is created. If the user is already a member of the app, their membership is reused and the role is updated when provided. Removed memberships are restored and receive a new app token.

An app-scoped token (appo_{appId}) is created for the membership and stored on the membership; it is not returned in this response.

Headers

Authorization: Bearer {token}
Content-Type: application/json
Accept: application/json

Body

json
{
  "email": "jane@example.com",
  "name": "Jane Doe",
  "password": "secret123",
  "role": 1
}
FieldRequiredDescription
emailYesEmail address of the user
nameNoDisplay name. Used only when the account is created; defaults to the email address
passwordNoInitial password (minimum 8 characters). Used only when the account is created; a random password is generated when omitted
roleNoRole index (idx), code, or name from meta.app.roles

Response 200 Success

json
{
  "id": "01jbv18r65gbnrcefvnr4ng4py",
  "name": "Jane Doe",
  "email": "jane@example.com",
  "role": 1,
  "created_at": "2026-01-01T00:00:00.000000Z"
}

cURL

bash
curl -X POST https://api.gola.work/api/team/{team}/app/{app}/user \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "email": "jane@example.com",
    "name": "Jane Doe",
    "password": "secret123",
    "role": 1
  }'

Errors

  • 422 — email is missing/invalid, password is shorter than 8 characters, or role does not match any role in the app.
  • 403 — the authenticated user is not allowed to add users to the app.
  • 404 — the app does not belong to the team.

DELETE /team/{team}/app/{app}/user/ ​

Remove a user from the application. The membership entry is soft-deleted, its stored app_token is cleared, and any app-specific API token (appo_{appId}) for that user is revoked. The user account itself is preserved.

Headers

Authorization: Bearer {token}
Accept: application/json

Response 200 Success

json
{
  "message": "User removed from the app"
}

cURL

bash
curl -X DELETE https://api.gola.work/api/team/{team}/app/{app}/user/{user} \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

Errors

  • 403 — the authenticated user is not allowed to remove this user.
  • 404 — the app does not belong to the team, or the user is not a member of the app.

Models ​

A model describes the fields available for a set of records. Models belong to a team and an app.

GET /team/{team}/app/{app}/model ​

List the models in the application that the authenticated user can view. App owners and users with {modelId}_view or {modelId}_viewa can view a model.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.

Response 200 Success

json
{
  "data": [
    {
      "id": "01kwkwdm0skdcx5fv8pc63w780",
      "name": "Course"
    }
  ]
}

For the app's default model, an additional slug field is returned with the default slug configured on the model.

cURL

bash
curl https://api.gola.work/api/team/{team}/app/{app}/model \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

GET /team/{team}/app/{app}/model/ ​

Retrieve a specific model within an application.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.

Response 200 Success

json
{
  "id": "01kwkwdm0skdcx5fv8pc63w780",
  "name": "Course",
  "fields": [
    {
      "id": "name",
      "type": "string",
      "name": "Title"
    },
    {
      "id": "data_1",
      "name": "Status",
      "type": "select",
      "meta": ["tb", "tf"],
      "permissions": [],
      "options": [
        { "id": 0, "name": "Active" },
        { "id": 1, "name": "Closed" }
      ]
    },
    {
      "id": "data_2",
      "name": "StartDate",
      "type": "date",
      "meta": ["tb", "cv"],
      "permissions": []
    },
    {
      "id": "data_3",
      "name": "TutorId",
      "type": "relation",
      "meta": ["tb"],
      "permissions": [],
      "source": "01kwkwdm0zbxqye4fc4mmxsjtw"
    }
  ]
}

Field Object

PropertyTypeDescription
idstringname for the record title field, otherwise data_{index}
namestringField label
typestringField type (see below)
metaarrayDisplay options (tb, tf, dv, cv, ts)
optionsarraySelect options as { id, name }; only for select fields
sourcestring|nullTarget model id; only for relation and structure fields
permissionsarrayField permissions in {roleIdx}_view / {roleIdx}_edit form. An empty array means the field is available to all app users with model access

The first entry (id: "name") is the record title field. It is always present and is not counted in the data_N indexes.

Field Types

CodeType
stringString
decimalDecimal number
numberInteger number
userApp user relation
relationRelation to another model
structureStructured repeater/table
textMulti-line text
selectDrop-down list
dateDate
datetimeDate and time
fileFile uploads
imageImage upload
richtextEditor.js rich text
embedEmbeddable URL

Meta Options

OptionMeaning
tbShow in the record table
tfShow a filter for the field
dvShow on the dashboard
cvEnable calendar view
tsInclude in the table summary

cURL

bash
curl https://api.gola.work/api/team/{team}/app/{app}/model/{model} \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

POST /team/{team}/app/{app}/model ​

Create a model. Only the team owner can create models.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.

Request Body

json
{
  "name": "Course",
  "fields": [
    {
      "id": "name",
      "name": "Title",
      "type": "string"
    },
    {
      "name": "Status",
      "type": "select",
      "meta": ["tb", "tf"],
      "options": [
        { "id": 0, "name": "Active" },
        { "id": 1, "name": "Closed" }
      ]
    },
    {
      "name": "Tutor",
      "type": "relation",
      "source": "01kwkwdm0zbxqye4fc4mmxsjtw",
      "permissions": ["1_view"]
    }
  ]
}
FieldRequiredDescription
nameYesModel name
fieldsNoOrdered list of fields
fields.*.idNoname for the title field or data_N. Missing or duplicate ids are assigned the next available index
fields.*.nameNoField label
fields.*.typeNoOne of the documented field types; defaults to string
fields.*.metaNoDisplay option flags
fields.*.sourceNoTarget model id for relation or structure fields. Must reference a model in the same team and app; invalid values are stored as null
fields.*.optionsNoSelect options as { id, name }. Missing ids receive the next option index
fields.*.permissionsNoField permissions in `{roleIdx}_{view

The field whose id is name is used as the record title and is not stored as a data_N field. When fields is omitted, the model is created with only the title field.

Response 200 Success

json
{
  "id": "01m5j5k631ds53b1s75hn0z2kp",
  "name": "Course",
  "fields": [
    { "id": "name", "type": "string", "name": "Title" },
    {
      "id": "data_1",
      "name": "Status",
      "type": "select",
      "meta": ["tb", "tf"],
      "permissions": [],
      "options": [
        { "id": 0, "name": "Active" },
        { "id": 1, "name": "Closed" }
      ]
    },
    {
      "id": "data_2",
      "name": "Tutor",
      "type": "relation",
      "meta": [],
      "permissions": ["1_view"],
      "source": "01kwkwdm0zbxqye4fc4mmxsjtw"
    }
  ]
}

cURL

bash
curl -X POST https://api.gola.work/api/team/{team}/app/{app}/model \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Course",
    "fields": [
      { "id": "name", "name": "Title", "type": "string" },
      {
        "name": "Status",
        "type": "select",
        "options": [{ "id": 0, "name": "Active" }]
      }
    ]
  }'

Errors

  • 403 — the authenticated user is not the team owner.
  • 404 — the app does not belong to the team.
  • 422 — missing name, an unsupported field type, or invalid field data.

PUT /team/{team}/app/{app}/model/ ​

Update a model. PATCH is accepted as an alias. Only the team owner can update models.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.

Request Body

json
{
  "name": "Courses",
  "fields": [
    {
      "id": "name",
      "name": "Course title",
      "type": "string"
    },
    {
      "id": "data_1",
      "name": "Status",
      "type": "select",
      "meta": ["tb", "tf"],
      "options": [
        { "id": 0, "name": "Active" },
        { "id": 1, "name": "Archived" }
      ]
    }
  ]
}

Both name and fields are optional.

When fields is supplied, it replaces the complete ordered field list: fields omitted from the request are removed. For fields included by data_N id, properties not sent in the request (for example required or date_end) are preserved. For select fields, options is always replaced by the submitted list (or emptied when omitted). Invalid source values for relation and structure fields are stored as null.

Response 200 Success

The response has the same shape as GET /team/{team}/app/{app}/model/{model} and reflects the updated fields.

cURL

bash
curl -X PUT https://api.gola.work/api/team/{team}/app/{app}/model/{model} \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Courses",
    "fields": [
      { "id": "name", "name": "Course title", "type": "string" }
    ]
  }'

Errors

  • 403 — the authenticated user is not the team owner.
  • 404 — the app does not belong to the team, or the model does not belong to the app.
  • 422 — invalid field data.

Model Records ​

Records are stored per model and are scoped to the team, app, and model. Values are returned as data_{fieldIndex} keys, where the index matches the field's id (data_1 in the field definition becomes data_1 in the record).

GET /team/{team}/app/{app}/model/{model}/data ​

List records for a model using simple pagination (15 records per page by default).

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.

Query Parameters

ParameterTypeDescription
pageintegerPage number
tableFilters[meta][fields][{index}][value]mixedFilter a select or relation field by its option index or related record id
tableFilters[meta][fields][{index}][{index}_from]dateStart of a date range for a date field
tableFilters[meta][fields][{index}][{index}_to]dateEnd of a date range for a date field
tableFilters[created_by][value]stringFilter by the user who created the record

Only fields with the tf meta flag have a filter. Filters are ignored for fields without tf.

Example:

?page=2&tableFilters[meta][fields][1][value]=0&tableFilters[created_by][value]=01jbv18r65gbnrcefvnr4ng4py

Date range example for field index 2:

?tableFilters[meta][fields][2][2_from]=2026-01-01&tableFilters[meta][fields][2][2_to]=2026-12-31

Response 200 Success

json
{
  "current_page": 1,
  "data": [
    {
      "id": "01kwkwdm3hvv6b71cjy2c5n5dt",
      "created_by": "01jbv18r65gbnrcefvnr4ng4py",
      "updated_by": "01jbv18r65gbnrcefvnr4ng4py",
      "name": "ESOL Entry 3",
      "created_at": "2026-07-03T11:39:28.000000Z",
      "updated_at": "2026-07-03T11:39:29.000000Z",
      "data_1": 0,
      "data_2": "2026-09-01",
      "data_3": "2027-01-15",
      "data_4": ["01kwkwdm4a2y4n9h1j6v14pve2"],
      "data_5": 0,
      "data_6": 0
    }
  ],
  "first_page_url": "https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data?page=1",
  "from": 1,
  "next_page_url": null,
  "path": "https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1
}

Only fields the authenticated user can view or edit are included. Record visibility is filtered by the user's model permissions ({modelId}_view / {modelId}_viewa) and app membership.

cURL

bash
curl "https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data?tableFilters[meta][fields][1][value]=0" \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

GET /team/{team}/app/{app}/model/{model}/data/ ​

Retrieve a specific record within a model.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.
datastringThe record identifier.

Response 200 Success

json
{
  "id": "01kwkwdm3hvv6b71cjy2c5n5dt",
  "created_by": "01jbv18r65gbnrcefvnr4ng4py",
  "updated_by": "01jbv18r65gbnrcefvnr4ng4py",
  "name": "ESOL Entry 3",
  "created_at": "2026-07-03T11:39:28.000000Z",
  "updated_at": "2026-07-03T11:39:29.000000Z",
  "data_1": 0,
  "data_4": ["01kwkwdm4a2y4n9h1j6v14pve2"]
}

cURL

bash
curl https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data/{data} \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

POST /team/{team}/app/{app}/model/{model}/data ​

Create a new record within a specific model.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.

Request Body

json
{
  "name": "ESOL Entry 3",
  "data_1": 0,
  "data_2": "2026-09-01",
  "data_4": ["01kwkwdm4a2y4n9h1j6v14pve2"]
}

name is the record title. data_{index} keys correspond to the model fields. Only fields the authenticated user can edit are stored; other keys are ignored. Values are stored as sent, without type coercion.

Response 200 Success

The response contains the created record's base fields and the editable data_{index} values that were stored.

cURL

bash
curl -X POST https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "ESOL Entry 3",
    "data_1": 0,
    "data_2": "2026-09-01",
    "data_4": ["01kwkwdm4a2y4n9h1j6v14pve2"]
  }'

POST /team/{team}/app/{app}/model/{model}/data/{data}/upload ​

Upload one or more files to a file or image field of an existing record. The field must be editable by the authenticated user.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.
datastringThe record identifier.

Request Body (multipart/form-data)

FieldTypeRequiredDescription
fieldstringYesField id (data_7), index (7), or field name (Media).
files[]fileYes*One or more files. Exactly one for image fields.
filefileYes*Alternative to files[] for a single file.
appendbooleanNofile fields only: append to existing files (default true) or replace them (false). image fields are always replaced.

* Provide either files[] or file. Maximum file size is 20 MB. image fields accept images only.

Response 200 Success

Returns the record with its editable fields. For file fields, data_{index} is an array of storage paths; for image fields it is a single storage path.

cURL

bash
curl -X POST https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data/{data}/upload \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -F "field=data_1" \
  -F "files[]=@first.pdf" \
  -F "files[]=@second.pdf" \
  -F "append=true"


PUT /team/{team}/app/{app}/model/{model}/data/ ​

Update an existing record within a model. PATCH is accepted as an alias.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.
datastringThe record identifier.

Request Body

json
{
  "name": "ESOL Entry 3 (updated)",
  "data_1": 1,
  "data_4": ["01kwkwdm4a2y4n9h1j6v14pve2"]
}

name is optional. Only the submitted data_{index} keys are changed; omitted fields keep their current values. Only fields the authenticated user can edit are written.

Response 200 Success

The response contains the updated record's base fields and the editable data_{index} values.

cURL

bash
curl -X PUT https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data/{data} \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "ESOL Entry 3 (updated)",
    "data_1": 1
  }'

DELETE /team/{team}/app/{app}/model/{model}/data/ ​

Delete a specific record within a model. The record is soft-deleted and later pruned.

Path Parameters

ParameterTypeDescription
teamstringThe team slug.
appstringThe application identifier.
modelstringThe model identifier.
datastringThe record identifier.

Response 200 Success

json
{
  "message": "OK"
}

cURL

bash
curl -X DELETE https://api.gola.work/api/team/{team}/app/{app}/model/{model}/data/{data} \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

Errors

  • 403 — the authenticated user does not have the model's del permission.
  • 404 — the record was not found.

Record Value Formats ​

Record values are stored in meta.fields.{index}. The API returns and accepts the following value shapes:

Field typeValue
string, text, embedString
numberInteger
decimalNumber
selectOption index (integer), or an array of option indexes for multi-select values
dateDate string, typically YYYY-MM-DD
datetimeDate-time string
userArray of user ids
relationArray of related record ids
fileArray of storage paths
imageStorage path string
richtextEditor.js document object
structureArray of structured values keyed by the nested field indexes

Errors ​

401 Unauthorized ​

Returned when the bearer token is missing or invalid:

json
{
  "message": "Unauthenticated."
}

POST /auth returns { "message": "Invalid login details" } for incorrect credentials.

403 Forbidden ​

Returned when the authenticated user is not allowed to perform the action:

json
{
  "message": "This action is unauthorized."
}

404 Not Found ​

Unmatched routes return:

json
{
  "message": "Not found"
}

Unresolvable bound models (team, app, model, or user) return standard model-not-found response.

422 Unprocessable Entity ​

Returned for validation errors:

json
{
  "message": "The email field is required. (and 1 more error)",
  "errors": {
    "email": [
      "The email field is required."
    ]
  }
}