powered by
Technical Reference

Operations

Updated Mar 20, 2026
The Operations page provides maintenance tools for your Anythink project. Currently it covers search index management — rebuilding or purging the search index for individual entities or the entire project.

Search operations

Anythink maintains a dedicated search index alongside your database. This index powers the fast full-text search available in Grid view and the public search API. In normal operation the index stays in sync automatically, but there are situations where you may need to manually intervene:

  • After bulk data imports where search wasn't updated
  • After restoring a database backup
  • When search results appear stale or inconsistent with the database
  • When troubleshooting unexpected search behaviour

Rehydrate search data

Rehydration rebuilds the search index from the current state of your database. All existing data in the index is replaced with a fresh copy pulled directly from your entities.

When to use: If search results are missing records that exist in the database, or if records appear in search that have been deleted.

Steps:

  1. Go to Settings → Operations
  2. Under Search Operations, click Execute next to Rehydrate Search Data
  3. Confirm the prompt — rehydration will begin in the background
  4. The Indexing Status panel will update to show Indexing for each affected entity
  5. Once complete, status returns to Ready

Rehydration may take a few minutes for large datasets. Your application remains fully functional during the process.


Purge search data

Purging clears all data from the search index without replacing it. After a purge, search will return no results until you run a rehydration.

When to use: If you need to completely reset the search index — for example, after a major schema change or data migration. Always follow a purge with a rehydrate.

Steps:

  1. Go to Settings → Operations
  2. Under Search Operations, click Execute next to Purge Search Data
  3. Confirm the prompt — this action cannot be undone
  4. All search index data is cleared immediately

Per-entity operations

You can rehydrate or purge the search index for a single entity rather than the whole project. This is faster and less disruptive when only one entity is affected.

The Indexing Status panel (below the Search Operations card) lists every entity and its current status:

Status Meaning
Ready (green) Index is in sync
Indexing (blue, spinning) Rehydration in progress
Failed (red) Last indexing attempt encountered an error

Each row has Rehydrate and Purge buttons scoped to that entity. The per-entity Rehydrate button is disabled while indexing is in progress to prevent concurrent operations.

Last indexed timestamp shows when the entity's index was last successfully rebuilt.


Access

The Operations page is restricted to Tenant Admins only. Standard users and editors cannot access this page.

API Reference

Updated Mar 19, 2026
A complete reference of every HTTP endpoint available in your Anythink project, grouped by resource. All endpoints are relative to your project base URL: `https://api.my.anythink.cloud/org/{orgId}/`

Authentication

All endpoints require an Authorization header unless marked as public:

text
Authorization: Bearer <jwt_or_api_key>

API keys (ak_...) are generated from your project dashboard and work for server-to-server calls.


Entities

Every entity you create gets a full set of CRUD endpoints automatically.

http
GET    /entities/{entity}/items
GET    /entities/{entity}/items/{id}
POST   /entities/{entity}/items
PUT    /entities/{entity}/items/{id}
DELETE /entities/{entity}/items/{id}

List parameters

Parameter Type Description
limit integer Records per page (default 20)
page integer Page number (default 1)
filter[field] string Filter by field value
sort string Field to sort by
order string asc or desc

Search

http
GET  /search?q=&e=&page=&pageSize=          (authenticated)
GET  /search/public?q=&e=&page=&pageSize=   (unauthenticated)
Parameter Description
q Search query. Defaults to *
e Entity name to scope search (optional)
page Page number
pageSize Results per page (default 20)

Authentication

http
POST  /auth/v1/token          Sign in with email + password
POST  /auth/v1/refresh        Refresh an expired JWT
GET   /auth/v1/google/authorize    Start Google OAuth flow
POST  /auth/v1/google/callback     Complete Google OAuth

Users

http
GET    /users              List all users
GET    /users/me           Current authenticated user
GET    /users/{id}         Get a user by ID
POST   /users              Create a user (invite)
PUT    /users/{id}         Update a user
DELETE /users/{id}         Delete a user

Roles

http
GET    /roles              List roles
POST   /roles              Create a role
PUT    /roles/{id}         Update a role
DELETE /roles/{id}         Delete a role

Files

http
GET    /files                  List files
GET    /files/{id}             Get file metadata
GET    /files/{id}/get         Download the file (authenticated)
GET    /files/{id}/public      Retrieve public file (no auth required)
POST   /files                  Upload a file
DELETE /files/{id}             Delete a file
DELETE /files                  Bulk delete files

Upload via multipart/form-data. Use ?entityId=&fieldName= query params to attach the file to a record on upload.


Workflows

http
GET    /workflows              List workflows
GET    /workflows/{id}         Get a workflow
POST   /workflows              Create a workflow
PUT    /workflows/{id}         Update a workflow
DELETE /workflows/{id}         Delete a workflow
POST   /workflows/{id}/trigger Run a workflow manually
POST   /workflows/endpoint/{route}   API trigger endpoint (custom route)

Payments

http
GET    /integrations/anythinkpay/payments                        List payments
GET    /integrations/anythinkpay/payments/{id}                   Get payment
GET    /integrations/anythinkpay/payments/status/{status}        Filter by status
POST   /integrations/anythinkpay/payments                        Create payment intent
POST   /integrations/anythinkpay/payments/charge-payment-method  Charge saved card
POST   /integrations/anythinkpay/payments/payment-intent/{id}/confirm    Confirm intent
POST   /integrations/anythinkpay/payments/payment-intent/{id}/capture    Capture intent
GET    /integrations/anythinkpay/payments/payment-intent/{id}    Get intent status

Stripe Connect

http
GET    /integrations/anythinkpay/stripe-connect            Account status
POST   /integrations/anythinkpay/stripe-connect            Create account
POST   /integrations/anythinkpay/stripe-connect/onboarding Get onboarding link
GET    /integrations/anythinkpay/stripe-connect/fees       Platform fee config
POST   /integrations/anythinkpay/stripe-connect/fees/calculate  Calculate fee

Payment Methods

http
GET    /integrations/anythinkpay/payment-methods                         List saved methods
GET    /integrations/anythinkpay/payment-methods/{id}                    Get by ID
POST   /integrations/anythinkpay/payment-methods/setup-intent            Create setup intent
DELETE /integrations/anythinkpay/payment-methods/{id}                    Remove

Menus

http
GET    /menus/my           Get the current user's menu
GET    /menus              List all menus
GET    /menus/{id}         Get a menu with items
POST   /menus              Create a menu
POST   /menus/{id}/items   Add an item
PUT    /menus/{id}         Update a menu
PUT    /menus/{id}/items/{itemId}         Update an item
PUT    /menus/{id}/items/reorder          Reorder items
DELETE /menus/{id}                        Delete a menu
DELETE /menus/{id}/items/{itemId}         Delete an item

Email Templates

http
GET    /email-templates            List templates
GET    /email-templates/{type}     Get a template by type
PUT    /email-templates/{type}     Update a template

Template types: confirmation, invite, recovery, magic_link, email_change, added_to_tenant


Secrets

http
GET    /secrets            List secret names (not values)
POST   /secrets            Create a secret
PUT    /secrets/{name}     Update a secret value
DELETE /secrets/{name}     Delete a secret

Response format

All list endpoints return a consistent paginated envelope:

json
{
  "items": [...],
  "total_items": 42,
  "page": 1,
  "page_size": 20,
  "has_next_page": true
}

HTTP status codes

Code Meaning
200 OK — request succeeded
201 Created — record created successfully
400 Bad Request — invalid parameters or body
401 Unauthorised — missing or invalid token
403 Forbidden — valid token but insufficient permissions
404 Not Found — resource does not exist
409 Conflict — duplicate value (e.g. unique field)
500 Server Error — something went wrong on our side

Template syntax

Updated Sep 30, 2026
How workflow templates read trigger data, earlier step outputs, secrets and the current time — including types, missing values and where templates are applied.

Templates put live values into workflow step parameters. Anythink resolves them immediately before each step runs.

text
{{ $anythink.trigger.data.email }}

Syntax

  • A template is an expression inside {{ }}. Spaces inside the braces are ignored.
  • A value can contain several templates and plain text: "Order {{ $anythink.trigger.id }} for {{ $anythink.trigger.data.email }}".
  • When a whole parameter is a single path, the braces are optional: "loop_over": "$anythink.steps.find_orders.data".
  • The only filter is default, which supplies a value when the path doesn't exist:
text
{{ $anythink.trigger.data.nickname | default: "there" }}

Variables

Expression Value
$anythink.trigger.id The id the job started with: the record id for entity events, entity_id for manual and API calls, empty for schedules
$anythink.trigger.data The trigger data. See Triggers and scheduling for what each trigger provides.
$anythink.trigger.data.<field> One field. Paths can go deeper: address.city, items[0].sku.
$anythink.steps.<key> The output of an earlier step with that key
$anythink.steps.<key>.data[0].<field> A field from the first item of a step's data list
$anythink.steps.<key>.data[*].<field> That field from every item, as a list
$anythink.secrets.<name> A project secret, decrypted. Always text.
$anythink.now The current time in UTC, such as 2026-09-14T08:30:00.000Z
<field> with no prefix A field of the current item, inside steps that repeat per item (see below)

Following relationships from trigger data

Trigger data paths follow relationships. If an order has a customer relationship, {{ $anythink.trigger.data.customer.email }} loads the related customer and reads its email. A field named customer_id is followed the same way.

Relationship lookups work on trigger data for entity events, not on step outputs.

The current item

Some steps repeat for each item in a list. Inside them, the item's fields are available without a prefix:

Step Repeats for
Create data, Upsert data Each item in loop_over
Update data with filters Each matched record
Send a push notification Each item of the step referenced with data[*]
json
{
  "entity_name": "invoices",
  "loop_over": "{{ $anythink.steps.due_orders.data }}",
  "payload": "{ \"order_id\": \"{{ id }}\", \"amount\": \"{{ total }}\", \"issued_at\": \"{{ $anythink.now }}\" }"
}

Types

In JSON parameters such as payload and body, a template keeps the value's type when it is the entire JSON value:

json
{ "total": "{{ $anythink.trigger.data.total }}" }     →  { "total": 129.5 }
{ "tags": "{{ $anythink.trigger.data.tags }}" }       →  { "tags": ["gift", "express"] }

When a template is part of longer text, the value is written as text. Lists and objects become compact JSON, and booleans are written True or False:

json
{ "summary": "Total {{ $anythink.trigger.data.total }}" }   →  { "summary": "Total 129.5" }

In parameters that aren't JSON — URLs, header values, filter values, email addresses and ids — the result is plain text.

Note: Write payloads as valid JSON, with each template in quotes. Anythink only escapes values and keeps their types when the payload parses as JSON before templates are filled in. An unquoted template such as { "total": {{ total }} } isn't valid JSON, so a value containing quotes or a new line can break the payload.

Note: Once a JSON payload contains a template, its other numbers are re-read as standard numbers. Very large ids (beyond 2^53) can lose precision. Send them as text.

Missing and empty values

Situation Result
The path, step or list item doesn't exist The template is left as written, braces included
The path doesn't exist and has default The default
The value exists but is null null when the template is the whole JSON value; empty text inside longer text
The secret doesn't exist The step fails with "Failed to retrieve secret with key…"

Unresolved templates stay in the output, so a typo shows up in the saved record or the step log rather than silently producing an empty value. Send an email and Send a push notification refuse to send anything that still contains {{.

A Read data step that returns no records leaves $anythink.steps.<key>.data[0].<field> unresolved, and an unresolved path compares as text in a Condition. To branch on whether anything was found, return a count from Run a script (return { count: $anythink.steps.find_orders.data.length };) and compare that count in the Condition.

Where templates apply

Step Templated Not templated
Read data Filter values Entity, fields, sort, limit, filter fields
Create data, Upsert data payload, loop_over, rls_user_group_id entity_name, match_on
Update data payload, ids, filter values, rls_user_group_id entity_name, rls_mode
Delete data Filter values entity_name
Condition field and value logical_operator
Call an API url, header values, body method, header names, results_path
Send an email to, from, payload, attachment ids template_type
Send a push notification Title, body, image, click action, category, data values, audience ids template_type, buttons
File handler Entity, record id, field, source URL, file name, folder, existing file id operation, link_mode
Integration Text values in inputs, connection_id, credential_field_path provider, operation
Run a script Not templated. Use the $anythink object in the script.

Trigger filters don't use templates.

Next steps