Data connectors
Get the lelemon-connector/v1 format
Returns the JSON Schemas of the four documents your connector serves (manifest, account card, account search and view page) and their limits. Use it to build or validate your connector before registering it. It reads nothing of your data and is safe to repeat.
Required scope: connectors:read.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Get the lelemon-connector/v1 format › Responses
objectformatJSON Schemas of the manifest, the account card, the account search and the view page.
Validate a connector document
Use it while you build your connector, before you register it: send the manifest, an account card, an account search answer or a view page exactly as you serve them, and get every place that does not follow lelemon-connector/v1 with its path (such as $.sections[0].components[1].value) and the reason, never the value. It runs the same validator that checks the real answers of your system, so a document that passes here passes there. Nothing is stored and nothing is sent to your system, so it is safe to repeat. For an account card send baseUrl or allowedOrigins, or its action links are rejected. To check the manifest your registered system serves, use POST /v2/data-connectors/{id}/check.
Required scope: connectors:read.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Validate a connector document › Request Body
typeWhich document you are checking: manifest, account (the card), accounts_search (the answer to GET {base}/accounts?email=) or view_page (a page of a view).
The JSON document exactly as your connector serves it. It is checked and thrown away: nothing is stored and nothing is sent to your system.
baseUrlFor account: the base URL of your connector. The hosts of an action link must be this host or one of allowedOrigins.
allowedOriginsFor account: more https origins an action link may use.
Validate a connector document › Responses
objecttypeokTrue when the document follows the format.
Every place that does not follow the format, up to 50, with its path. Values are never repeated.
List data connectors
Newest first. It does not call your systems.
Required scope: connectors:read.
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List data connectors › Responses
objecthasMorenextCursorRegister a data connector
Registers the API of your system that serves lelemon-connector/v1: account cards and views that Lelemon reads live and never stores. The base URL must be https, public, and its site must be allowed for this key: an http URL, one with a user or password, or a private address answers 422 action_destination_blocked. It does not call your system: read the signing secret with GET /v2/data-connectors/{id}/signing-secret, serve the format, then call POST /v2/data-connectors/{id}/check. Until the check passes the connector is pending and gives no tools to the copilot.
Required scope: connectors:write.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Register a data connector › Request Body
nameHow you see it. Its lowercase form (up to 16 characters) prefixes the tools the copilot gets from this connector, so it cannot repeat another connector.
baseUrlThe https base URL of your connector. Lelemon calls {baseUrl}/manifest, {baseUrl}/accounts and {baseUrl}/views/{viewId}. It must be public and its site must be allowed for this key, the same list actions use. Redirects are not followed.
allowedOriginsExtra sites that an action link of your account cards may point to, besides the host of baseUrl. Each one must be allowed for this key.
Register a data connector › Responses
objectidnameslugThe prefix of the copilot tools of this connector, for example backoffice_account.
originOnly the origin of the base URL. The full URL never comes back.
allowedOriginsformatstatuspending: created, never checked. active: the last check passed. error: the last check or the manifest failed, see lastError.
lastErrorviewCountViews in the stored manifest.
manifestFetchedAtcreatedAtupdatedAtRetrieve a data connector
Its status and the origin of its base URL. It does not call your system.
Required scope: connectors:read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a data connector › Responses
objectidnameslugThe prefix of the copilot tools of this connector, for example backoffice_account.
originOnly the origin of the base URL. The full URL never comes back.
allowedOriginsformatstatuspending: created, never checked. active: the last check passed. error: the last check or the manifest failed, see lastError.
lastErrorviewCountViews in the stored manifest.
manifestFetchedAtcreatedAtupdatedAtDelete a data connector
Stops every read through it and removes its tools from the copilot. The audit of past reads is kept for two years.
Required scope: connectors:write.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Delete a data connector › Responses
Deleted.
Update a data connector
Changes only what you send. A new baseUrl or new allowedOrigins put the connector back to pending and drop its stored manifest until you call the check endpoint again. The sites must be allowed for this key.
Required scope: connectors:write.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Update a data connector › Request Body optional
namebaseUrlChanging it puts the connector back to pending until you call the check endpoint.
allowedOriginsUpdate a data connector › Responses
objectidnameslugThe prefix of the copilot tools of this connector, for example backoffice_account.
originOnly the origin of the base URL. The full URL never comes back.
allowedOriginsformatstatuspending: created, never checked. active: the last check passed. error: the last check or the manifest failed, see lastError.
lastErrorviewCountViews in the stored manifest.
manifestFetchedAtcreatedAtupdatedAtRetrieve the signing secret of a data connector
Every call of Lelemon to your connector carries a Lelemon-Signature header. Pass the whole secrets list, the method, the full URL and the raw body (empty) to verifyRequest of the SDK with domain connector. The signature covers the path and query, so it is worthless for any other route, and it expires in 60 seconds. It needs connectors:write because it is a secret. Read only: it returns the same secrets until you rotate.
Required scope: connectors:write.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve the signing secret of a data connector › Responses
objectconnectorIdsecretsThe secrets that sign the calls to this connector, newest first. After a rotation the previous one is listed for 24 hours. Pass the whole list to verifyRequest of the SDK with domain connector.
previousValidUntilRotate the signing secret of a data connector
Creates a new secret. The previous one keeps signing alongside the new one for 24 hours, so you can change it in your system without a cut. Every call rotates again, and the secret of the earlier rotation stops being listed: send an Idempotency-Key so a retry does not rotate twice. The response carries no secret: read it with GET /v2/data-connectors/{id}/signing-secret. Use dryRun=true to see when the previous secret would stop working; nothing rotates.
Required scope: connectors:write.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
query Parameters
dryRunWhen true, the request goes through the same validation as the real one and is answered with what would happen (always 200), and nothing is saved, sent or charged. The answer has the same shape as the real one plus dryRun: true; an id in it is not saved. It does not use the Idempotency-Key.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Rotate the signing secret of a data connector › Responses
objectrotatedAtpreviousValidUntildryRunPresent and true when the request had dryRun=true.
Check a data connector
Calls GET {baseUrl}/manifest signed, validates it against lelemon-connector/v1 and stores the manifest. If it passes, the connector becomes active and its views become tools for the copilot. If the response does not follow the format, it answers 200 with ok false and the failing paths (never the values). It reads the manifest only: account cards, searches and views are validated when they are read, and a read that fails answers 422 data_connector_invalid_response with its failing paths; test them before with POST /v2/data-connectors/format/validate. If the connector does not answer, it answers 422 data_connector_unavailable and the connector goes to error. It calls your system and is safe to repeat, up to 20 checks per minute for an organization: the next one answers 429 rate_limited with Retry-After.
Required scope: connectors:write.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Check a data connector › Responses
objectokRetrieve the manifest of a data connector
The manifest stored by the last check: its views and how accounts are looked up. It does not call your system; use it to know which views and filters exist before reading one.
Required scope: connectors:read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve the manifest of a data connector › Responses
objectformatnameSearch accounts by email
Asks your connector live for the accounts whose email matches. Use it to get the stable account id; the email is only for searching, store the id as the externalRef of the contact. Titles come back masked when they look like a RUT, email or phone. Nothing is stored, only the audit of who looked. Use GET /v2/data-connectors/{id}/accounts/{account} when you already have the id.
Required scope: connectors:read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
query Parameters
emaillimitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Search accounts by email › Responses
objecthasMorenextCursorRead the card of an account live
Asks your connector for the card of one account and returns it masked: fields marked sensitive and any value shaped like a RUT, email or phone come back with value null and masked true. Nothing is stored; the read is audited. To see one masked value use POST /v2/data-connectors/{id}/accounts/{account}/reveal. Answers 404 when your connector does not know the account.
Required scope: connectors:read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
accountThe id of the account in your system, exactly as the connector returns it from the search.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Read the card of an account live › Responses
objectidThe stable id your connector gives the account.
titlesubtitleReveal one masked value of an account
Reads the card live again and returns the real value of one field. The audit records the key, the account (as a keyed hash) and the field, never the value, and it is written before the value is returned. Fields marked specialCategory cannot be revealed (403). The response is never stored for idempotent replay. Use it only when the person must see the value.
Required scope: connectors:reveal.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
accountThe id of the account in your system, exactly as the connector returns it from the search.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Reveal one masked value of an account › Request Body
fieldKey^[a-z][a-z0-9_]{0,39… · requiredThe key of a field of the account card.
Reveal one masked value of an account › Responses
objectkeyvalueTypecurrencyGet the link of an account action
Reads the card live and returns the https link of one action, only if its host is inside the sites of the connector. Lelemon never calls the link: the person opens it in a new tab with rel=noopener noreferrer. The click is audited. The link may carry a one-time token, so the response is never stored for idempotent replay.
Required scope: connectors:read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
accountThe id of the account in your system, exactly as the connector returns it from the search.
actionThe name of the action, as listed by the manifest of the connector.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Get the link of an account action › Responses
objecturlAn https link inside the sites of the connector. Open it in a new tab with rel=noopener noreferrer. Lelemon never calls it.
Read a view live
Asks your connector for one page of a view declared in its manifest, for example the accounts in trial. Filters go as filter[name]=value and only the names the manifest declares are accepted (422 otherwise). The page keeps the connector order and cursor; sensitive columns and values shaped like a RUT, email or phone come back masked. Nothing is stored; the read is audited.
Required scope: connectors:read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
viewThe name of the view, as listed by the manifest of the connector.
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Read a view live › Responses
objecthasMorenextCursorColumns of the view: key, label, valueType and sensitive.
Rows with id, optional accountId and cells. Each cell is { value, masked, maskReason? }.
List who looked at what through a connector
Newest first. Each access has the key or member, the kind (read_account, read_view, reveal, open_action...), the view, the field and an account hash; it never has a value. integrity is tampered when a row no longer matches its signature. Kept for two years. Filter by accountId to answer a data subject request.
Required scope: connectors:audit-read.
path Parameters
id^dcn_[0-9A-Za-z]{22}… · requiredThe id of the data connector (dcn_…).
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
accountIdOnly the accesses to this account id.
kindHeaders
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List who looked at what through a connector › Responses
objecthasMorenextCursor