In this section · 1 article

Choose between the API, webhooks and a public API

Three ways to connect another system to Laramin: call the signed-in API, receive signed webhooks, or read a module's public API. See which fits your job, which credential each needs, and where each is documented.

Applies to
Core 12.7 and later
Who can do this
Developer, Platform owner
On this page

In short

Call the API when your system needs to ask Laramin something, as a person. Receive webhooks when your system needs to know the moment something changes. Read a public API when a website or app shows published content to anyone. Many integrations use two: a webhook to hear that something changed, then an API call to read it.

Diagram: your code calls the Laramin API with a token or mobile sign-in, Webhook Engine sends a signed POST to your endpoint, and a website reads a public API; a dotted line shows webhook then API call.

How the three compare

The APIWebhooksA module's public API
DirectionYour system calls LaraminLaramin calls your systemYour website or app calls Laramin
Acts asThe person whose token you sendNobody: it's a noticeAnyone, or a registered application
CredentialA personal API token or a mobile sign-inA signing secret you check on each messageNone, or an API consumer key
Good forReading a person's data, acting on their behalf in an appKeeping another system in step, starting a workflowWebsites, apps and build tools showing published content
Set up inAccount menu › API TokensWebhook EngineThe module, plus Developer Tools › API Consumers for keys
Documented inCore API endpoints and each module's referenceWebhook payloads, headers and eventsThe module's reference

When to use each

The API

Use it when something must happen as a particular person, with their permissions: a mobile app, a script that reads someone's notifications, a report that pulls a module's data. Create a token for a dedicated account whose roles allow only what the integration needs. See Authenticate API requests.

Don't poll the API to find out whether something changed. That wastes your rate limit and still finds changes late. Use a webhook.

Webhooks

With the Webhook Engine add-on, your Laramin sends an HTTP POST to your endpoint when users, blog articles or Headless CMS content change, signed so you can check it's genuine. Your endpoint answers within 10 seconds, and failures are retried.

A webhook says what changed, not always everything about it. Headless CMS events, for example, carry ids and versions only: fetch the content from the delivery API.

A module's public API

Modules that publish content to a website have a public API that needs no sign-in:

These are safe to call from a visitor's browser, as long as your website's address is on your Laramin's list of allowed origins. Give a server, app or build tool its own key, so you can tell callers apart and stop one at a time. See Register an API consumer and issue its key.

What Laramin doesn't offer

  • OAuth apps for third parties. You can't let people "Sign in with Laramin" to your service, or register an OAuth client from a screen. Integrations use personal API tokens.
  • Write access from a personal API token. Personal tokens are read-only. Changes are made on screen, or by a mobile app signed in as its user.
  • A bulk export API. To move a lot of data at once, use Export a list to CSV.

Incoming messages from providers

Some modules receive messages from outside services, such as delivery receipts from an SMS or WhatsApp provider. Those addresses belong to the module and are set up in the provider's console, not called by your own systems. They stay open during maintenance mode.

Next steps