Secrets and contacts

Store the API keys your flows sign in with, and list, read or erase the people a workspace talks to, through the REST API.

On this page

Two parts of a workspace are managed through the REST API only: the vault of secrets your flows sign in with, and the contacts your channels have talked to. The examples below run in the browser's console on a page of Ñomongeta, signed in (writes are only accepted from the same site; see authorization).

Secrets

A secret is a credential an HTTP request step uses by name. Its value is encrypted, never returned by any route, and never reaches a flow's variables, test mode or messages.

RouteRoleDoes
GET /secretsBuilderLists names, kinds, hosts and the value's last 4 characters (for values of 16 or more).
PUT /secrets/<name>AdminCreates the secret, or replaces it (201 created, 200 replaced).
DELETE /secrets/<name>AdminDeletes it. Steps that still use it fail with secret_missing.
js
await fetch("/api/nomongeta/v1/secrets/reservations_api", {
  method: "PUT",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    kind: "bearer",
    value: "<the API key>",
    hosts: ["api.example.com"],
  }),
});
Field
kindbearer (Authorization: Bearer …), basic (value user:password), header or query.
paramThe header name (header) or the address parameter (query).
valueOne line, up to 4,096 characters.
hostsWhere it may be sent: up to 20 names, exact (api.example.com) or a subdomain pattern (*.example.com).

A name is up to 100 letters, digits and _ . : -. A workspace keeps up to 100 secrets.

Contacts

A contact is one person on one channel, created on their first message: a phone number on WhatsApp, an address by e-mail, an anonymous visitor on the website chat. See variables and contacts.

RouteRoleDoes
GET /contactsAgentLists contacts, most recently active first. q searches names and addresses, tag filters, limit (up to 100), and before (the previous page's next) pages.
GET /contacts/<id>AgentOne contact, with how many conversations it has.
DELETE /contacts/<id>AdminErases the contact with their conversations, messages and flow runs. It can't be undone.
js
const res = await fetch("/api/nomongeta/v1/contacts?tag=vip&limit=50");
const { contacts, next } = await res.json();

Each contact carries its name, tags, the values of contact variables (vars), lastInboundAt, and serviceWindowOpen: whether WhatsApp's 24-hour window is open for it right now.

Still stuck?

Ask us. We read every message.

Privacy