{"info":{"_postman_id":"561b9ff0-5172-43b6-a761-861c0f0295a6","name":"Origami API Documentation","description":"<html><head></head><body><h1 id=\"origami-public-api-documentation\">Origami Public API Documentation</h1>\n<p>Verified against <strong>code</strong> (<code>origami-webserver</code> allow_api_external_access + field pipeline) and <strong>stage.origami.ms</strong> (2026-08-02 session harness + phone write/readback).</p>\n<p><strong>Local full refs:</strong> <code>Origami_API_Complete_Reference.md</code> v2.0 · <code>Origami_API_Make_Field_Shapes.md</code> · <code>Origami_Finance_API_Documentation.md</code></p>\n<h2 id=\"collection-variables\">Collection variables</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>base_url</code></td>\n<td>e.g. <code>https://stage.origami.ms</code> or <code>https://YOUR_ACCOUNT.origami.ms</code></td>\n</tr>\n<tr>\n<td><code>username</code></td>\n<td>API user email</td>\n</tr>\n<tr>\n<td><code>api_secret</code></td>\n<td><code>OGMI-…</code> (must match the account in base_url)</td>\n</tr>\n<tr>\n<td><code>entity_data_name</code></td>\n<td>e.g. <code>e_76</code> from List All Entities</td>\n</tr>\n<tr>\n<td><code>instance_id</code></td>\n<td>Record Mongo <code>_id</code></td>\n</tr>\n<tr>\n<td><code>group_data_name</code></td>\n<td>e.g. <code>g_175</code> from entity_structure</td>\n</tr>\n<tr>\n<td><code>field_data_name</code></td>\n<td>e.g. <code>fld_1057</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"platform-rules-verified\">Platform rules (verified)</h2>\n<ol>\n<li>Errors often return <strong>HTTP 200</strong> + <code>{\"error\":...}</code> — always branch on body.</li>\n<li>Filters MUST be array-of-arrays: <code>[[\"fld\",\"=\",\"val\"],...]</code>. Wrong shape (array of objects) <strong>silently returns ALL records</strong> (stage-confirmed).</li>\n<li>Pagination is ONLY <code>\"limit\": [skip, count]</code>. <code>page</code> / <code>offset</code> do nothing.</li>\n<li>Request flag <code>\"normalized\":\"1\"</code> flattens the response and <strong>DROPS</strong> phone <code>normalize</code> (country code) and field metadata.</li>\n<li>Auth is body <code>username</code> + <code>api_secret</code> (OGMI-…). Secrets are <strong>per account</strong> — webmark secret does not work on stage.</li>\n<li>Prefer <code>Content-Type: application/json</code> + <code>/format/json</code> URL suffix (except archive_action, multipart upload).</li>\n</ol>\n<h2 id=\"phone-field-input-telephone--nested-read-only\">Phone field (<code>input-telephone</code>) — nested read only</h2>\n<p>When reading WITHOUT <code>normalized:\"1\"</code>, a phone field may look like:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"value\": \"501234567\",\n  \"normalize\": {\n    \"country_code\": \"972\",\n    \"normalized_short\": \"501234567\",\n    \"normalize_full\": \"972501234567\"\n  }\n}\n</code></pre>\n<ul>\n<li>No key named <code>prefix</code> — use <code>normalize.country_code</code> (no <code>+</code>).</li>\n<li><code>normalize</code> is <strong>optional</strong> (missing on some legacy/unparseable values).</li>\n<li>Stage write <code>\"+972501234567\"</code> → read <code>value:\"501234567\"</code> + full normalize object.</li>\n</ul>\n<h2 id=\"external-endpoint-map\">External endpoint map</h2>\n<ul>\n<li><strong>Entities:</strong> entities_list, entity_structure, instance_data, instance_data_protected, create_instance, update_instance_fields, add/remove_group_repetition, remove_instance, archive_action, upload_file, file, send_email, send_sms, instances_history, calander_view_details</li>\n<li><strong>Invoices:</strong> create_invoice, instance_data</li>\n<li><strong>UI:</strong> push_notification, translate</li>\n<li><strong>Omnichannel:</strong> new_message</li>\n</ul>\n<h2 id=\"changelog\">Changelog</h2>\n<ul>\n<li><strong>2026-08-02 (v2 sync):</strong> Full description rewrite; update-by-field-type samples; phone normalize (stage-verified); pagination/filter warnings; create bulk notes; omnichannel Duplicate Message casing; archive/comms/history folders; nested read request.</li>\n<li><strong>2026-07-31:</strong> delivery_note/work_order, file POST download, push minutes, external_unique_id draft.</li>\n</ul>\n<h2 id=\"pbx-app-folder-16\">PBX app (folder 16)</h2>\n<p>Provider webhook — <strong>not</strong> username/api_secret auth. Uses per-line <code>secret_key</code>.</p>\n<p><strong>Public URL</strong> (from PBX admin “call entry URL”):\n<code>{PUBLIC_URL}pbx_app/endpoint_pbx/{ORIGAMI_ACCOUNT}/{account_ukey}</code></p>\n<p>Example: <code>https://public.origami.ms/pbx_app/endpoint_pbx/stage/1712345678_12345</code></p>\n<p>Public relay → internal <code>pbx_app/api_public/endpoint_pbx_app</code> with:\n<code>{ account_id: \"pbx_\"+account_ukey, data: &lt;payload&gt;, external_service_name: \"pbx_app_external\" }</code></p>\n<p><strong>Payload fields (admin lang docs + code):</strong> call_id, secret_key, from, to, extension, sending_type (incoming/outgoing), call_status (answered/busy/rejected/missed), call_sub_status (empty or call_completed), call_start_time, call_end_time, call_duration, call_recording_link, call_summary.</p>\n<p><strong>HTTP errors (code):</strong> 400 invalid_payload / missing_required_fields / missing_secret_key · 403 invalid_secret · 404 unknown_account · 200 status:1 · 502 upstream_failure (relay).</p>\n<p>Session-only UI APIs (not in this folder): <code>pbx_app/api/get_messages</code>, <code>outgoing_call</code> (browser session).</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Origami Public API Documentation","slug":"origami-public-api-documentation"}],"owner":"2653695","collectionId":"561b9ff0-5172-43b6-a761-861c0f0295a6","publishedId":"2s93kz65gS","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-05-28T08:26:06.000Z"},"item":[{"name":"1. Entity Structure","item":[{"name":"List All Entities","id":"6f00ac11-04f0-4102-aac1-db184d5313e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\"\n}"},"url":"https://stage.origami.ms/entities/api/entities_list/format/json","description":"<p>Returns every entity available to the API user.</p>\n<p><strong>Response (array):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\"entity_name\":\"Entity1\",\"entity_data_name\":\"e_76\",\"protected_entity\":\"0\"},\n  {\"entity_name\":\"origami_users\",\"entity_data_name\":\"origami_users\",\"protected_entity\":\"1\"}\n]\n</code></pre>\n<ul>\n<li><code>protected_entity:\"1\"</code> → use <strong>instance_data_protected</strong> (SUPA API user). Stage examples: origami_users, origami_user_groups, origami_invoices, origami_payments.</li>\n<li>Stage sample size: hundreds of entities depending on account.</li>\n</ul>\n","urlObject":{"path":["entities","api","entities_list","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f00ac11-04f0-4102-aac1-db184d5313e3"},{"name":"Get Entity Structure (Fields & Groups)","id":"6e5ef9d3-6782-487f-b1d3-fca5dd320642","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\"\n}"},"url":"https://stage.origami.ms/entities/api/entity_structure/format/json","description":"<p>Schema for one entity. <strong>Required reading before create/update.</strong></p>\n<p><strong>Response top-level:</strong> <code>entity_data</code>, <code>instance_data</code> (groups).</p>\n<p>Each field includes:</p>\n<ul>\n<li><code>field_data_name</code> — use in filters/updates (<code>fld_NNNN</code>)</li>\n<li><code>field_type_name</code> — drives value shape (phone, relation, file, …)</li>\n<li><code>field_name</code>, required/validation, <code>possible_values</code></li>\n</ul>\n<p>Stage e_76 example types: input-telephone, select-from-entity, upload-files, formula-field, assign-field, input-address, wysiwyg, multi-value-*, checkbox, datetime, …</p>\n","urlObject":{"path":["entities","api","entity_structure","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"6e5ef9d3-6782-487f-b1d3-fca5dd320642"}],"id":"6ce86072-9dc6-44c2-ae3e-09f02d80085a","description":"<p>Discover entities and field schemas. Call these before create/update so you know <code>entity_data_name</code>, <code>group_data_name</code>, <code>field_data_name</code>, and <code>field_type_name</code>.</p>\n","_postman_id":"6ce86072-9dc6-44c2-ae3e-09f02d80085a"},{"name":"2. Create Instance","item":[{"name":"Create Instance","id":"49d7e25c-bd95-44a3-9a28-0b72e3fbc6b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"form_data\": [\n    {\n      \"group_data_name\": \"g_175\",\n      \"data\": [{\n        \"fld_910\": \"API sample title\",\n        \"fld_3556\": \"notes\"\n      }]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/create_instance/format/json","description":"<p><strong>Create one record.</strong></p>\n<h3 id=\"rules\">Rules</h3>\n<ul>\n<li>Each group block: one object in <code>data</code> holding all that group's fields (repeatable: one object per row).</li>\n<li>Relations / user fields: <strong>plain instance id string</strong> — not <code>{{instance_id, text}}</code> (invalid ID).</li>\n<li>Phone: string e.g. <code>\"+972501234567\"</code> or <code>\"050-1234567\"</code>.</li>\n<li>Success: <code>{{\"success\":\"ok\",\"results\":{{\"_id\":\"…\"}}}}</code></li>\n<li>Validation: <code>{{\"error\":{{\"type\":\"validation\",\"column\":[{{\"field_data_name\",\"message\",…}}]}}}}</code></li>\n<li>Stage: missing required field in another group fails even if you filled this group.</li>\n</ul>\n<h3 id=\"optional\">Optional</h3>\n<ul>\n<li><code>\"bulk\": \"1\"</code> + form_data = array of records, <strong>max 200</strong></li>\n<li><code>\"force_workflow_async\": true</code></li>\n</ul>\n","urlObject":{"path":["entities","api","create_instance","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"49d7e25c-bd95-44a3-9a28-0b72e3fbc6b9"},{"name":"Create Instance (Multiple Groups)","id":"1e10e3a0-36e6-4155-be08-ff21d4e1e7ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"form_data\": [\n    {\n      \"group_data_name\": \"g_175\",\n      \"data\": [{ \"fld_910\": \"Required F1\", \"fld_3556\": \"area text\" }]\n    },\n    {\n      \"group_data_name\": \"origami_calendar_group\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/create_instance/format/json","description":"<p>Create with <strong>multiple groups</strong> in one call. Include every required field across groups (discover via entity_structure).</p>\n<p>Replace field_data_names with yours from structure — sample ids are stage e_76 oriented.</p>\n","urlObject":{"path":["entities","api","create_instance","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"1e10e3a0-36e6-4155-be08-ff21d4e1e7ec"},{"name":"Create Instance (Bulk max 200)","id":"d9262150-bd7d-41f8-b020-996b2e08e3c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"bulk\": \"1\",\n  \"form_data\": [\n    [\n      { \"group_data_name\": \"g_175\", \"data\": [{ \"fld_910\": \"Row A\" }] }\n    ],\n    [\n      { \"group_data_name\": \"g_175\", \"data\": [{ \"fld_910\": \"Row B\" }] }\n    ]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/create_instance/format/json","description":"<p><strong>Bulk create:</strong> <code>\"bulk\":\"1\"</code>. <code>form_data</code> is an array of records (each record is the usual group array). <strong>Max 200</strong> per call (code-enforced).\nAdjust field names to required fields for your entity.</p>\n","urlObject":{"path":["entities","api","create_instance","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9262150-bd7d-41f8-b020-996b2e08e3c7"}],"id":"7767035d-837d-406c-ae9f-0cefad16ed4c","description":"<p>Create records. Use form_data (NOT the update field-triples shape). Required fields in ALL groups must be sent or you get validation.column[].</p>\n","_postman_id":"7767035d-837d-406c-ae9f-0cefad16ed4c"},{"name":"3. Read / Query Data","item":[{"name":"Select Nested (keep phone normalize / field objects) ★","id":"4090f34f-17c3-4cf8-9cda-6f9fbd92282a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"limit\": [0, 50]\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<p><strong>DEFAULT nested response</strong> — use this for Make field mapping (phone country code, relations, files).</p>\n<p>Response shape:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{ info: { total_count }, entity_data, data: [\n  { instance_data: {\n      _id, insertTimestamp, field_groups: [\n        { field_group_data, fields_data: [[ { field_data_name, field_type_name, value, group_index, normalize? } ]] }\n      ]\n  } }\n] }\n</code></pre><h2 id=\"phone-field-input-telephone--nested-read-only\">Phone field (<code>input-telephone</code>) — nested read only</h2>\n<p>When reading WITHOUT <code>normalized:\"1\"</code>, a phone field may look like:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"value\": \"501234567\",\n  \"normalize\": {\n    \"country_code\": \"972\",\n    \"normalized_short\": \"501234567\",\n    \"normalize_full\": \"972501234567\"\n  }\n}\n</code></pre>\n<ul>\n<li><p>No key named <code>prefix</code> — use <code>normalize.country_code</code> (no <code>+</code>).</p>\n</li>\n<li><p><code>normalize</code> is <strong>optional</strong> (missing on some legacy/unparseable values).</p>\n</li>\n<li><p>Stage write <code>\"+972501234567\"</code> → read <code>value:\"501234567\"</code> + full normalize object.</p>\n</li>\n<li><p>Metadata fields: value is often in <strong>default_value</strong>, not value.</p>\n</li>\n<li><p>Stage: total_count + data[] confirmed on e_76.</p>\n</li>\n</ul>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"4090f34f-17c3-4cf8-9cda-6f9fbd92282a"},{"name":"Select Flattened (normalized:1) — loses phone normalize","id":"9ba33b73-7947-4d70-9f7c-d57e6b216cb1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"limit\": [0, 50],\n  \"normalized\": \"1\"\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<p>Flattens to:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[{ \"id\":\"…\", \"insertTimestamp\":\"…\", \"g_175\": { \"fld_x\": \"scalar\" } }]\n</code></pre>\n<p>⚠ <strong>Drops</strong> phone <code>normalize</code>, field_id, field_type_name. Stage-confirmed no normalize leak.\nEmpty results may keep nested shape — handle both.\n<code>info.total_count</code> is dropped when transform runs.</p>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"9ba33b73-7947-4d70-9f7c-d57e6b216cb1"},{"name":"Select with Pagination limit:[skip,count]","id":"ced4a473-530e-445a-919b-378824e13ba2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"limit\": [0, 2]\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<p><strong>Pagination = <code>limit: [skip, count]</code> only.</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Example</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>[0, 50]</code></td>\n<td>first 50</td>\n</tr>\n<tr>\n<td><code>[50, 50]</code></td>\n<td>next 50</td>\n</tr>\n<tr>\n<td><code>50</code></td>\n<td>same as <code>[0, 50]</code></td>\n</tr>\n</tbody>\n</table>\n</div><p>Max count 500 (1000 on-prem). <strong><code>page</code> / <code>offset</code> / <code>skip</code> / <code>start</code> do NOTHING.</strong>\nStage: <code>[0,2]</code> vs <code>[2,2]</code> returned disjoint ids.</p>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"ced4a473-530e-445a-919b-378824e13ba2"},{"name":"Select by ID","id":"fc0cfc83-789b-497c-b80b-62db9c13f9f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"limit\": [0, 5]\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<p><code>_id</code> IS filterable. Stage: exact match returns 1 row.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"filter\": [[\"_id\", \"=\", \"6a6f94428e10b823460eb692\"]]\n</code></pre>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc0cfc83-789b-497c-b80b-62db9c13f9f5"},{"name":"Select with Filter","id":"33281019-5c96-48eb-a49f-68e66a44ac87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"fld_1057\", \"like\", \"05\"]],\n  \"limit\": [0, 50]\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<h3 id=\"filter-syntax-and\">Filter syntax (AND)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"filter\": [[\"fld_x\", \"=\", \"val\"], [\"fld_y\", \"like\", \"abc\"]]\n</code></pre>\n<p><strong>Operators:</strong> <code>=</code>, <code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, <code>&gt;=</code>, <code>like</code>, <code>not like</code>, <code>IN</code>, <code>NOT IN</code>, <code>EMPTY</code>, <code>NOT EMPTY</code><br /><strong>Dates:</strong> <code>today</code>, <code>yesterday</code>, <code>date_range</code>, <code>x_days_back</code>, <code>last_7_days</code>, …<br /><strong>Geo:</strong> <code>[\"fld_loc\",\"geo\",{{\"lat\":32.0,\"lng\":34.7,\"radius\":5}}]</code></p>\n<h3 id=\"🔴-critical\">🔴 CRITICAL</h3>\n<p>Wrong shape e.g. <code>[{{\"field\":\"x\",\"op\":\"=\",\"value\":\"y\"}}]</code> does <strong>NOT</strong> error — returns <strong>ALL records</strong> unfiltered (stage: good filter 0 rows, bad shape 5 rows).</p>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"33281019-5c96-48eb-a49f-68e66a44ac87"},{"name":"Select with orderby","id":"55d5d366-c032-427c-ac05-c62e608c28c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"limit\": [0, 20],\n  \"orderby\": [\"_id\", \"desc\"]\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<p><code>orderby</code>: e.g. <code>[\"fld_data_name\",\"asc\"|\"desc\"]</code> or <code>[\"_id\",\"desc\"]</code>.<br />Field sorts use Mongo <code>sort.fld_&lt;id&gt;</code>. <code>_id</code> maps to insertTimestamp when skip is not huge.\nStage: accepted and returned rows.\nOptional: <code>return_fields</code>, <code>return_groups</code>, <code>with_archive: 0</code> (exclude archived).</p>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"55d5d366-c032-427c-ac05-c62e608c28c5"},{"name":"Select Including Archived","id":"48f05021-e40f-46da-86e7-a10130e9cb6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"limit\": [0, 50],\n  \"with_archive\": 1\n}"},"url":"https://stage.origami.ms/entities/api/instance_data/format/json","description":"<p><code>with_archive: 0</code> forces exclude archived (when entity allows archive).<br />Unset / non-zero → archived not filtered out.<br /><code>info.total_count</code> still counts <strong>active only</strong>.</p>\n","urlObject":{"path":["entities","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"48f05021-e40f-46da-86e7-a10130e9cb6e"}],"id":"f250f857-8bd5-494f-948b-c9217669e7e3","description":"<p>instance_data reads. Use nested (default) when you need phone country code or relation objects. Use normalized:1 only for simple flat maps.</p>\n","_postman_id":"f250f857-8bd5-494f-948b-c9217669e7e3"},{"name":"4. Update Fields (by type)","item":[{"name":"Update — Text / Area / Email / Link","id":"d93a480a-6ae9-4882-9fc6-62a2acff422c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_title\", \"Hello world\", 0],\n    [\"fld_notes\", \"Longer text\", 0],\n    [\"fld_email\", \"a@example.com\", 0],\n    [\"fld_website\", \"https://example.com\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>input-text</code>, <code>input-area</code>, <code>input-email</code>, <code>input-link</code>. Strings.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"d93a480a-6ae9-4882-9fc6-62a2acff422c"},{"name":"Update — Phone (input-telephone) ★","id":"55df05af-6fcd-480f-b628-d4d1a99a5093","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_1057\", \"+972501234567\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Type:</strong> <code>input-telephone</code>.</p>\n<p>Send a <strong>string</strong> (national or E.164-ish). Also valid: <code>\"050-1234567\"</code>, <code>\"0501234567\"</code>.</p>\n<p><strong>Stage-verified write→read:</strong></p>\n<ul>\n<li>Write: <code>\"+972501234567\"</code></li>\n<li>Read nested: <code>value: \"501234567\"</code>, <code>normalize: { country_code: \"972\", normalize_full: \"972501234567\", normalized_short: \"501234567\" }</code></li>\n</ul>\n<p>There is no separate <code>prefix</code> key — country code is <code>normalize.country_code</code> on <strong>read</strong> (omit <code>normalized:1</code>).</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"55df05af-6fcd-480f-b628-d4d1a99a5093"},{"name":"Update — Checkbox","id":"9f98caa1-fedb-4c6c-9302-cf24a4e518ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_active\", \"1\", 0],\n    [\"fld_opt_out\", \"0\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Type:</strong> <code>input-checkbox-singel</code>. Write <code>\"1\"</code>/<code>\"0\"</code> (true/false also accepted). Read usually <code>\"1\"</code>/<code>\"0\"</code>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"9f98caa1-fedb-4c6c-9302-cf24a4e518ff"},{"name":"Update — Select list / Icons","id":"dd41d22a-ccc6-4d75-a2d1-8f7b2a8daf32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_status\", \"Open\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>select-list</code>, <code>icons-list</code>. Value must match a configured option (<code>possible_values</code> / structure).</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"dd41d22a-ccc6-4d75-a2d1-8f7b2a8daf32"},{"name":"Update — Number / Slider","id":"343fc1ce-940c-4f3b-adb8-0196dfeb630f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_score\", 7, 0],\n    [\"fld_slider\", 42, 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>select-from-numbers-range</code>, <code>slider-selector</code>. Numeric values.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"343fc1ce-940c-4f3b-adb8-0196dfeb630f"},{"name":"Update — Date / Time","id":"6c180f78-8787-4336-9614-aec51c99ea88","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_due\", \"02/08/2026\", 0],\n    [\"fld_time\", \"14:30\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>input-datetime</code>, <code>input-time</code>. Use field format / account locale (<code>d/m/Y</code> vs <code>m/d/Y</code>).</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c180f78-8787-4336-9614-aec51c99ea88"},{"name":"Update — Multi-value tags","id":"3e32fe55-0142-4d5b-83ff-18f419529ee3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_tags\", [\"vip\", \"newsletter\", \"he\"], 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>multi-value-select-box</code>, <code>multi-value-free-type</code>.<br /><strong>Replaces</strong> the whole list (not append). Clear: <code>[]</code>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e32fe55-0142-4d5b-83ff-18f419529ee3"},{"name":"Update — Relation / User (plain id string) ★","id":"b0c99aa3-9fb8-4884-9d41-9a9ace94944c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_customer\", \"69de27bb69e487f6490b8a88\", 0],\n    [\"fld_owner\", \"-2\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>select-from-entity</code>, <code>user-field</code>.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Direction</th>\n<th>Shape</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Read</strong></td>\n<td><code>{{ \"instance_id\":\"…\", \"text\":\"Label\" }}</code></td>\n</tr>\n<tr>\n<td><strong>Update write</strong></td>\n<td><strong>plain id string only</strong></td>\n</tr>\n</tbody>\n</table>\n</div><p><code>\"-2\"</code> = current API user. Sending the full object often → <code>\"invalid ID\"</code>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"b0c99aa3-9fb8-4884-9d41-9a9ace94944c"},{"name":"Update — Multi-relation / Assign","id":"2b5c2cc2-31ac-4e48-af23-16b0f0591cfc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_contacts\", [\"69de27bb69e487f6490b8a88\", \"6a33ad3109e1ae5da0078855\"], 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Types:</strong> <code>multi-select-from-entity</code>, <code>assign-field</code>. Array of instance ids. Replaces set. Clear: <code>[]</code>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b5c2cc2-31ac-4e48-af23-16b0f0591cfc"},{"name":"Update — Address","id":"fc3311b2-502f-4335-bbd1-3903617b3d05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_addr\", {\n      \"value\": \"Rothschild 1, Tel Aviv\",\n      \"lnglat\": [34.7818, 32.0853]\n    }, 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Type:</strong> <code>input-address</code>. <code>lnglat</code> = <strong>[lng, lat]</strong> numeric. Incomplete objects fail validation.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc3311b2-502f-4335-bbd1-3903617b3d05"},{"name":"Update — API field","id":"b70def83-f4ba-4f43-8d84-146386b9aeb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_ext\", { \"id\": \"EXT-99\", \"text\": \"External label\" }, 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Type:</strong> <code>api-field</code>. Both <code>id</code> and <code>text</code> required, max 255 each.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"b70def83-f4ba-4f43-8d84-146386b9aeb3"},{"name":"Update — Wysiwyg HTML","id":"62afbff8-3d8c-4b52-8536-5a0d4ae6a22d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_body\", \"<p>Hello <b>world</b></p>\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Type:</strong> <code>wysiwyg</code>. HTML string; scripts stripped.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"62afbff8-3d8c-4b52-8536-5a0d4ae6a22d"},{"name":"Update — File attach (after upload_file)","id":"5d502f68-b105-44f1-83ae-3a5fe110d0ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_attachment\", \"\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p><strong>Type:</strong> <code>upload-files</code> (signature similar).</p>\n<ol>\n<li>Run <strong>Upload File</strong> → copy <code>results._id</code> into <code>file_id</code> variable  </li>\n<li>Run this update</li>\n</ol>\n<p>Also accepted: <code>{{ \"file_id\": \"\" }}</code>. Clear: <code>\"\"</code> or <code>\"0\"</code>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"5d502f68-b105-44f1-83ae-3a5fe110d0ec"},{"name":"Update — Mixed multi-field","id":"ade4fd78-db78-43d4-8c9c-88d52757ef0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_910\", \"Acme lead\", 0],\n    [\"fld_1057\", \"+972547790966\", 0],\n    [\"fld_email\", \"lead@acme.com\", 0],\n    [\"fld_active\", \"1\", 0],\n    [\"fld_tags\", [\"hot\", \"il\"], 0],\n    [\"fld_customer\", \"69de27bb69e487f6490b8a88\", 0],\n    [\"fld_owner\", \"-2\", 0]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p>One call, many field types. Replace fld_* with your structure names. Stage update success body includes <code>instances_updated</code> + <code>fields_updated_total</code>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"ade4fd78-db78-43d4-8c9c-88d52757ef0b"},{"name":"Update — Repeatable group cell","id":"f33cf160-cecd-498b-a359-1c945e454b93","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]],\n  \"field\": [\n    [\"fld_line_qty\", 5, 2],\n    [\"fld_line_desc\", \"Widget x5\", 2]\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/update_instance_fields/format/json","description":"<p>Third element <code>2</code> = row's <strong>stored group_index</strong> from nested read (not array position).<br />Add/remove rows: folders <strong>6. Repeatable Groups</strong>.</p>\n<h3 id=\"envelope-rules\">Envelope rules</h3>\n<ul>\n<li>Triple: <code>[field_data_name, value, group_index]</code></li>\n<li><code>group_index</code> = <code>0</code> non-repeatable; repeatable = <strong>stored</strong> group_index from nested read</li>\n<li>Always filter by <code>_id</code> for single-record safety</li>\n<li>Success (stage): <code>{\"success\":\"ok\",\"results\":{\"instances_updated\":1,\"fields_updated_total\":N}}</code></li>\n<li>NOT <code>form_data</code> (create only). JSON body required.</li>\n</ul>\n","urlObject":{"path":["entities","api","update_instance_fields","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"f33cf160-cecd-498b-a359-1c945e454b93"}],"id":"c39a0c26-d807-4e65-9eec-640777c70950","description":"<p>update_instance_fields — one request per value shape. Replace field_data_names with yours from entity_structure. Stage-verified phone + update success body.</p>\n","_postman_id":"c39a0c26-d807-4e65-9eec-640777c70950"},{"name":"5. Remove Instance","item":[{"name":"Remove by IDs Array","id":"ef11d154-46a8-47eb-a072-f3379018287f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"_ids\": [\"\"]\n}"},"url":"https://stage.origami.ms/entities/api/remove_instance/format/json","description":"<p><strong>Permanent delete.</strong> <code>_ids</code> is always an array (even for one id).<br />Wrong param / form-urlencoded can yield misleading 403.</p>\n","urlObject":{"path":["entities","api","remove_instance","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"ef11d154-46a8-47eb-a072-f3379018287f"},{"name":"Remove by Filter (careful)","id":"f6792e6c-1932-4b9b-8655-f4bd316689f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"filter\": [[\"_id\", \"=\", \"\"]]\n}"},"url":"https://stage.origami.ms/entities/api/remove_instance/format/json","description":"<p>Filter-based delete. Prefer <code>_ids</code> for API. Wrong filter shape is dangerous.</p>\n","urlObject":{"path":["entities","api","remove_instance","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"f6792e6c-1932-4b9b-8655-f4bd316689f5"}],"id":"6f3709a0-dc65-4dfb-8e6a-84cabd9d36fa","description":"<p>Hard delete is permanent. Prefer archive (folder 8) when soft-delete is enough.</p>\n","_postman_id":"6f3709a0-dc65-4dfb-8e6a-84cabd9d36fa"},{"name":"6. Repeatable Groups","item":[{"name":"Add Group Repetition","id":"13865f2d-0e28-4c41-ad1f-f29d39af8263","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"_id\": \"\",\n  \"group_data_name\": \"g_175\",\n  \"group_data\": {\n    \"fld_line_desc\": \"New line\",\n    \"fld_line_qty\": 1\n  }\n}"},"url":"https://stage.origami.ms/entities/api/add_group_repetition/format/json","description":"<p>Adds a row; enforces required fields in that group. Returns <code>new_max_group_index</code>.<br />Optional: <code>bulk:\"1\"</code>, <code>force_workflow_async</code>.</p>\n","urlObject":{"path":["entities","api","add_group_repetition","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"13865f2d-0e28-4c41-ad1f-f29d39af8263"},{"name":"Remove Group Repetition","id":"04616d3f-7002-41f0-be10-76ce43b63f37","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"_id\": \"\",\n  \"group_data_name\": \"g_175\",\n  \"index\": 0\n}"},"url":"https://stage.origami.ms/entities/api/remove_group_repetition/format/json","description":"<p><code>index</code> = the row's <strong>stored <code>group_index</code></strong>, NOT its position in the array (they diverge after remove+add). Read the cell first.</p>\n","urlObject":{"path":["entities","api","remove_group_repetition","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"04616d3f-7002-41f0-be10-76ce43b63f37"}],"id":"62b97c81-1b6d-4176-902d-04a5d22eb214","description":"<p>Add/remove rows in repeatable groups. Edit cells via Update Fields with stored group_index.</p>\n","_postman_id":"62b97c81-1b6d-4176-902d-04a5d22eb214"},{"name":"7. Files","item":[{"name":"Upload File","id":"c167b91e-9446-41cd-9cc5-9a0944908360","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"","type":"text"},{"key":"api_secret","value":"","type":"text"},{"key":"file","type":"file","src":[]}]},"url":"https://stage.origami.ms/entities/api/upload_file/format/json","description":"<p>Multipart form-data:</p>\n<ul>\n<li><code>username</code>, <code>api_secret</code></li>\n<li>binary part name <strong><code>file</code></strong> (not <code>userfile</code>)</li>\n</ul>\n<p>Returns file reference e.g. <code>results._id</code> — set collection variable <code>file_id</code>, then <strong>Update — File attach</strong>.</p>\n<p>Does not link to a field automatically. ~80 MB; plan attachment quota.</p>\n","urlObject":{"path":["entities","api","upload_file","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"c167b91e-9446-41cd-9cc5-9a0944908360"},{"name":"Download File (POST + credentials) ★","id":"704b68e1-1452-4b89-af30-a839b02cd8c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\"\n}"},"url":"https://stage.origami.ms/entities/api/file?f=","description":"<p><strong>API credential recipe (verified):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://stage.origami.ms/entities/api/file?f=\nContent-Type: application/json\n{\"username\":\"…\",\"api_secret\":\"…\"}\n</code></pre><p>GET works only with browser session — query-string secrets are ignored (<code>user not loggin</code>).<br />Missing id (stage): <code>{\"error\":{\"type\":\"error\",\"message\":\"Not Found\"}}</code>.</p>\n","urlObject":{"path":["entities","api","file"],"host":["https://stage.origami.ms"],"query":[{"key":"f","value":""}],"variable":[]}},"response":[],"_postman_id":"704b68e1-1452-4b89-af30-a839b02cd8c3"}],"id":"b4f8de78-d27b-43d1-9d9e-fa1252dcc4e9","description":"<p>Upload does NOT attach to a record. Download for API credentials is POST with body auth (GET is session-only).</p>\n","_postman_id":"b4f8de78-d27b-43d1-9d9e-fa1252dcc4e9"},{"name":"8. Archive","item":[{"name":"Archive Record (type:in)","id":"ed0416ab-486c-40df-a90c-cc9ec1f73058","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"id\": \"\",\n  \"type\": \"in\"\n}"},"url":"https://stage.origami.ms/entities/api/archive_action","description":"<p>Soft-archive. Success: <code>{\"success\":\"ok\"}</code>.<br />Errors: <code>invalid_type</code>, <code>entity_data_name_require</code>, <code>id_require</code>, <code>check_data</code>.<br />Stage: <code>type:\"nope\"</code> → <code>invalid_type</code>.</p>\n","urlObject":{"path":["entities","api","archive_action"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"ed0416ab-486c-40df-a90c-cc9ec1f73058"},{"name":"Unarchive Record (type:out)","id":"9c76324e-c5ab-4cb4-b938-daebbefd4270","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"id\": \"\",\n  \"type\": \"out\"\n}"},"url":"https://stage.origami.ms/entities/api/archive_action","description":"<p>Restore archived record. <code>type: \"out\"</code>.</p>\n","urlObject":{"path":["entities","api","archive_action"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c76324e-c5ab-4cb4-b938-daebbefd4270"}],"id":"bb1a63ee-6316-41aa-92eb-980c74a0e9eb","description":"<p>Soft delete / restore. Endpoint has NO /format/json suffix.</p>\n","_postman_id":"bb1a63ee-6316-41aa-92eb-980c74a0e9eb"},{"name":"9. Calendar Events","item":[{"name":"Create with Calendar Event","id":"aa15b23a-36d4-4134-be06-44649a5e6b0c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_calendar_group\",\n      \"data\": [{\n        \"origami_calendar_field\": {\n          \"title\": \"Meeting\",\n          \"start\": \"2026-08-10 10:00\",\n          \"end\": \"2026-08-10 11:00\"\n        }\n      }]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/entities/api/create_instance/format/json","description":"<p>Calendar entities need valid calendar field payload (server runs <code>check_calander_validations_and_prepper</code>).<br />Adjust field names via entity_structure. View listing: <strong>Calendar View Details</strong> (path <code>calander_view_details</code>).</p>\n","urlObject":{"path":["entities","api","create_instance","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"aa15b23a-36d4-4134-be06-44649a5e6b0c"},{"name":"Calendar View Details (calander spelling)","id":"8485b2b2-d217-44be-9f1e-8dc963e8afa7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"start\": \"2026-08-01\",\n  \"end\": \"2026-08-31\"\n}"},"url":"https://stage.origami.ms/entities/api/calander_view_details/format/json","description":"<p><strong>Spelling is <code>calander</code> in the URL (not calendar).</strong></p>\n<p>Required: <code>start</code> + <code>end</code> (valid dates). <code>entity_data_name</code> and/or <code>widget_id</code>.<br />Optional: <code>filter</code>, <code>resource_filter</code>, <code>custom_view_ids</code>, <code>other_calenders</code>, <code>view</code>.<br />Stage non-calendar entity may return <code>No Results</code> query error.</p>\n","urlObject":{"path":["entities","api","calander_view_details","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"8485b2b2-d217-44be-9f1e-8dc963e8afa7"}],"id":"2fddd076-aff3-4372-8ffd-8ea33e000846","description":"<p>Creating calendar-entity records. View query is under History &amp; Calendar View (spelling calander).</p>\n","_postman_id":"2fddd076-aff3-4372-8ffd-8ea33e000846"},{"name":"10. Protected Entities","item":[{"name":"Select Protected Entity Data","id":"40a50ca5-c7dc-400b-bdee-cfdbb6f44431","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"origami_users\",\n  \"limit\": [0, 10]\n}"},"url":"https://stage.origami.ms/entities/api/instance_data_protected/format/json","description":"<p>Same params as instance_data. Non-SUPA → permission error. Normal instance_data returns no access for protected entities.</p>\n","urlObject":{"path":["entities","api","instance_data_protected","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"40a50ca5-c7dc-400b-bdee-cfdbb6f44431"}],"id":"367410b2-1daa-4091-acd6-b2d26902abc0","description":"<p>protected_entity=1 (users, invoices entity, …) requires this endpoint + SUPA API user.</p>\n","_postman_id":"367410b2-1daa-4091-acd6-b2d26902abc0"},{"name":"11. Push Notifications","item":[{"name":"Send Push Notification","id":"defdf77f-71ee-4719-aa54-ed0b68fc64de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"user_id\": \"\",\n  \"text\": \"Hello from API\",\n  \"duration\": \"10\",\n  \"id\": \"push-1\",\n  \"button\": {\n    \"type\": \"link\",\n    \"url\": \"https://example.com\"\n  }\n}"},"url":"https://stage.origami.ms/ui/api/push_notification","description":"<ul>\n<li><code>duration</code> is <strong>minutes</strong> (code comment). <code>0</code> = sticky (never auto-dismiss).</li>\n<li><code>user_id</code> = origami user instance id</li>\n<li><code>button</code> optional: <code>type</code> link|location; location can target entity/invoice</li>\n<li><code>id</code> = update id (reuse to update existing notification)</li>\n</ul>\n","urlObject":{"path":["ui","api","push_notification"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"defdf77f-71ee-4719-aa54-ed0b68fc64de"}],"id":"340c4434-2a23-4547-bec0-5e1a45619b16","description":"<p>In-app push to a logged-in Origami user.</p>\n","_postman_id":"340c4434-2a23-4547-bec0-5e1a45619b16"},{"name":"12. Invoice System","item":[{"name":"Create Tax Invoice Receipt","id":"44361be5-052d-4adf-b8cf-8e271e437684","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"tax_receipt\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [\n        {\n          \"<FIELD_DATA_NAME>\": \"<VALUE>\"\n        }\n      ]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Tax Invoice Receipt (חשבונית מס קבלה) — the most common document type in Israel. Uses the origami_invoices_general_details group for form data.</p>\n<p>type: tax_receipt\ngroup_data_name: origami_invoices_general_details</p>\n<p>Origami automatically assigns a sequential document number and creates a PDF. Success response includes _id, file_id (for the PDF), and doc_number.</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"44361be5-052d-4adf-b8cf-8e271e437684"},{"name":"Create Tax Invoice","id":"85d9310d-289b-437d-9eae-6516a715be60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"tax_invoice\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Tax Invoice (חשבונית מס) — a tax invoice without a receipt component.</p>\n<p>type: tax_invoice\ngroup_data_name: origami_invoices_general_details</p>\n<p>IMPORTANT: All invoice types use the same group_data_name — all five invoice types use origami_invoices_general_details.</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"85d9310d-289b-437d-9eae-6516a715be60"},{"name":"Create Receipt","id":"7e5e0e0a-e15e-49d2-a7b9-5532af1e58c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"receipt\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Receipt (קבלה).</p>\n<p>type: receipt\ngroup_data_name: origami_invoices_general_details</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"7e5e0e0a-e15e-49d2-a7b9-5532af1e58c1"},{"name":"Create Proforma Invoice","id":"bc2b2525-89b8-4c6b-ba18-5bb52ef3ac7a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"deal_invoice\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Proforma Invoice (הצעת מחיר).</p>\n<p>type: deal_invoice\ngroup_data_name: origami_invoices_general_details</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc2b2525-89b8-4c6b-ba18-5bb52ef3ac7a"},{"name":"Create Work Order (הזמנת עבודה)","id":"77585255-7d6b-4750-94f4-e39f748691b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"work_order\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Work Order (הזמנת עבודה) - added 2026-07 (#5813). type: work_order. VAT-bearing, own numbering series, NO IL Tax Authority provisioning, no cancel/convert. Same form_data shape as deal_invoice (general_details + items groups). Extras: origami_invoices_scheduled_date_fld, origami_invoices_hours_fld, origami_invoices_assignee_fld.</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"77585255-7d6b-4750-94f4-e39f748691b4"},{"name":"Create Delivery Note (תעודת משלוח)","id":"e1c78364-8fdf-43f4-9338-3a29c7b54295","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"delivery_note\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Delivery Note (תעודת משלוח) - added 2026-07 (#5813). type: delivery_note. VAT-bearing, own numbering series, NO IL Tax Authority provisioning, no cancel/convert. Same form_data shape as deal_invoice (general_details + items groups). Extras: origami_invoices_ship_to_fld, origami_invoices_carrier_fld.</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"e1c78364-8fdf-43f4-9338-3a29c7b54295"},{"name":"Create Credit Invoice","id":"50032d17-ed92-4280-b8cf-426dd7c57281","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"refund_invoice\",\n  \"attach_type\": \"tax_invoice\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [{}]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>Creates a Credit Invoice / Refund (חשבונית זיכוי) — a credit note that references an existing invoice. Requires an additional attach_type parameter to specify which type of invoice is being credited.</p>\n<p>type: refund_invoice\nattach_type: tax_invoice (or other invoice type being credited)\ngroup_data_name: origami_invoices_general_details</p>\n<p>VERIFIED DETAILS (2026-07-31): the attach reference field (origami_invoices_attach_invoice_fld, or origami_invoices_attach_tax_receipt_fld when crediting a receipt/tax_receipt) MUST be an object {'instance_id':'...','text':'...'} — a bare string is silently ignored and the credit computes 0. attach_type special value 'manual' = standalone credit without a parent attach. Credit lines must send EXPLICIT item_total_fld + item_tax_fld + item_credited_fld. WARNING: no over-refund guard — the server never checks the parent's remaining balance.</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"50032d17-ed92-4280-b8cf-426dd7c57281"},{"name":"Select Tax Invoice Receipts","id":"cfa8db75-4ac2-4bd7-a048-6d42424c8acc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"invoice_type\": \"tax_receipt\"\n}"},"url":"https://stage.origami.ms/invoices/api/instance_data/format/json","description":"<p>Retrieves Tax Invoice Receipt records. The response format is the same as entity instance_data — with info (pagination), entity_data, and data arrays.</p>\n<p>invoice_type values: tax_receipt, tax_invoice, receipt, deal_invoice, refund_invoice, delivery_note, work_order, income_and_expences (read-only)</p>\n<p>Supports the same filter and pagination parameters as entity queries.</p>\n<p>Pagination: page is IGNORED here - use limit:[skip,count] (e.g. [0,50] then [50,50]); verified 2026-07-31.</p>\n","urlObject":{"path":["invoices","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"cfa8db75-4ac2-4bd7-a048-6d42424c8acc"},{"name":"Select Tax Invoices","id":"8b542032-b4a1-4db0-82b9-378f4accba2b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"invoice_type\": \"tax_invoice\"\n}"},"url":"https://stage.origami.ms/invoices/api/instance_data/format/json","description":"<p>Retrieves Tax Invoice records. Same response format and filtering as entity instance_data.</p>\n","urlObject":{"path":["invoices","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"8b542032-b4a1-4db0-82b9-378f4accba2b"},{"name":"Select Receipts","id":"6d646a7f-a896-4bb1-b1da-cb9c0282627a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"invoice_type\": \"receipt\"\n}"},"url":"https://stage.origami.ms/invoices/api/instance_data/format/json","description":"<p>Retrieves Receipt records. Same response format and filtering as entity instance_data.</p>\n","urlObject":{"path":["invoices","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d646a7f-a896-4bb1-b1da-cb9c0282627a"},{"name":"Select Proforma Invoices","id":"ef28679c-c617-4ef7-8112-21df597069a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"invoice_type\": \"deal_invoice\"\n}"},"url":"https://stage.origami.ms/invoices/api/instance_data/format/json","description":"<p>Retrieves Proforma Invoice records. Same response format and filtering as entity instance_data.</p>\n","urlObject":{"path":["invoices","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"ef28679c-c617-4ef7-8112-21df597069a6"},{"name":"Select Credit Invoices","id":"112d35af-3442-4ea3-8d69-d5d45b5f26b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"invoice_type\": \"refund_invoice\"\n}"},"url":"https://stage.origami.ms/invoices/api/instance_data/format/json","description":"<p>Retrieves Credit Invoice / Refund records. Same response format and filtering as entity instance_data.</p>\n","urlObject":{"path":["invoices","api","instance_data","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"112d35af-3442-4ea3-8d69-d5d45b5f26b3"},{"name":"Create with external_unique_id (v6.3.6 - NOT YET RELEASED)","id":"2be1d236-ef71-4fc9-9bbb-29dede353cb2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"type\": \"tax_receipt\",\n  \"saved_id\": \"\",\n  \"round_total\": 0,\n  \"external_unique_id\": \"<clearing_txn_id>\",\n  \"form_data\": [\n    {\n      \"group_data_name\": \"origami_invoices_general_details\",\n      \"data\": [\n        {}\n      ]\n    }\n  ]\n}"},"url":"https://stage.origami.ms/invoices/api/create_invoice","description":"<p>DRAFT - DO NOT USE until v6.3.6 ships (ticket #6003, MR !1746). Optional idempotency key on create_invoice: pass external_unique_id = your clearing/payment transaction id (string, max 128 chars; unique per document type per account). Retry with the SAME key: completed -&gt; returns the ORIGINAL document with duplicate:true (no new document); still running -&gt; {code:'in_progress'}; different customer/total/currency -&gt; {code:'conflict'}; malformed key -&gt; {code:'invalid_external_unique_id'}; store unavailable -&gt; {code:'idempotency_unavailable'} (document NOT created, safe retry). Reservation happens after validation and BEFORE IL Tax Authority provisioning. Integration rule: never blind-retry create_invoice on timeout - retry with the same key. All responses HTTP 200 - branch on body.</p>\n","urlObject":{"path":["invoices","api","create_invoice"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"2be1d236-ef71-4fc9-9bbb-29dede353cb2"}],"id":"20a2c78d-5252-4116-8edc-7f9f08a50d34","description":"<p>Finance app public endpoints: create_invoice + instance_data.</p>\n<p>Full contract: Origami_Finance_API_Documentation.md<br />Types: deal_invoice, tax_invoice, tax_receipt, receipt, refund_invoice, delivery_note, work_order.<br /><code>income_and_expences</code> create broken (read-only).<br />⚠ Creating docs issues real legal numbers on production — use stage.</p>\n<p>Stage: deal_invoice list returned rows + total_count 238 (2026-08-02).\nPagination: limit:[skip,count] works; page ignored.\nItem field is catalog instance id; global_discount required (send 0/percent).\nexternal_unique_id draft not released until v6.3.6.</p>\n","_postman_id":"20a2c78d-5252-4116-8edc-7f9f08a50d34"},{"name":"13. Communications","item":[{"name":"Send Email","id":"3fa63cb4-92fe-4c46-87e9-cecf7c9e4cca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"subject\": \"Hello\",\n  \"msg\": \"<p>Body HTML</p>\",\n  \"email_list\": [\"a@example.com\"],\n  \"bcc\": 1\n}"},"url":"https://stage.origami.ms/entities/api/send_email/format/json","description":"<p>Required: subject, msg, email_list.<br /><code>bcc:1</code> (default) BCC; <code>0</code> = To.<br /><strong>Cap: 500 API calls/day/account</strong> (not recipients).<br />Missing params (stage): <code>\"subject, msg, email_list are must\"</code>.</p>\n","urlObject":{"path":["entities","api","send_email","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"3fa63cb4-92fe-4c46-87e9-cecf7c9e4cca"},{"name":"Send SMS","id":"935fde2c-bba1-4274-a60c-e02cd24427ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"instance_id\": \"\",\n  \"phone_list\": [\"050-1234567\"],\n  \"msg\": \"Your text\"\n}"},"url":"https://stage.origami.ms/entities/api/send_sms/format/json","description":"<p>Tied to a record for context/credits (workflow SMS sender). Required: entity_data_name, instance_id, phone_list, msg.</p>\n","urlObject":{"path":["entities","api","send_sms","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"935fde2c-bba1-4274-a60c-e02cd24427ea"}],"id":"7abe5fe6-852c-4acc-bf55-a7b62a4b827c","description":"<p>Email + SMS via entities API.</p>\n","_postman_id":"7abe5fe6-852c-4acc-bf55-a7b62a4b827c"},{"name":"14. History","item":[{"name":"Instances History","id":"9764579d-427e-4c5d-8bf6-a2db00495c80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"entity_data_name\": \"e_76\",\n  \"id\": \"\",\n  \"counter\": 20,\n  \"offset\": 0\n}"},"url":"https://stage.origami.ms/entities/api/instances_history/format/json","description":"<p><code>counter</code> = page size, <code>offset</code> = skip.<br />Stage sample: <code>{\"error\":{\"type\":\"query\",\"message\":\"No Results\"}}</code>.<br />add_instances_history_comment is session-only (not external whitelist).</p>\n","urlObject":{"path":["entities","api","instances_history","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"9764579d-427e-4c5d-8bf6-a2db00495c80"}],"id":"e0db26c8-1be2-48bf-96a6-f48c391617a7","description":"<p>Audit history. May return No Results if audit log not enabled for the account/context.</p>\n","_postman_id":"e0db26c8-1be2-48bf-96a6-f48c391617a7"},{"name":"15. Omnichannel External","item":[{"name":"New Message (inject)","id":"cc1eb7fe-8b51-49ad-8f37-e84ad54a840e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"username\": \"\",\n  \"api_secret\": \"\",\n  \"message_info\": {\n    \"message_type\": \"text\",\n    \"sending_type\": \"incoming\",\n    \"message_text\": \"Hi, I would like a quote\",\n    \"timestamp\": \"2026-08-02T14:30:00+03:00\",\n    \"from\": \"+972501234567\",\n    \"to\": \"+972541234567\",\n    \"message_id\": \"unique-msg-id-001\"\n  },\n  \"properties\": { \"app_type\": \"whatsapp\" }\n}"},"url":"https://stage.origami.ms/omnichannel_external/api/new_message/format/json","description":"<p><strong>Stage-verified:</strong></p>\n<ul>\n<li>First post: <code>{\"status\":1}</code></li>\n<li>Same <code>message_id</code> again: <code>{\"status\":0,\"message\":\"Duplicate Message\"}</code> (treat as success on retry)</li>\n</ul>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Values</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>app_type</td>\n<td>whatsapp | email_app | pbx_app only</td>\n</tr>\n<tr>\n<td>sending_type</td>\n<td>incoming | outgoing</td>\n</tr>\n<tr>\n<td>message_type</td>\n<td>text, image, document, location, contacts, audio (<strong>no video</strong>)</td>\n</tr>\n<tr>\n<td>media</td>\n<td>properties.origami_files: [{{file_name, file_id}}] from upload_file</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["omnichannel_external","api","new_message","format","json"],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc1eb7fe-8b51-49ad-8f37-e84ad54a840e"}],"id":"a20f90e6-be62-4052-9652-d971efcb614a","description":"<p>Write-only message inject. message_id is idempotency key.</p>\n","_postman_id":"a20f90e6-be62-4052-9652-d971efcb614a"},{"name":"16. PBX Webhook (provider)","item":[{"name":"Incoming — answered (ring / start)","id":"5082a27c-6948-4a22-a7fa-b06986e64988","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret_key\": \"\",\n  \"call_id\": \"call_1785824465\",\n  \"from\": \"0501234567\",\n  \"to\": \"039999999\",\n  \"extension\": \"\",\n  \"sending_type\": \"incoming\",\n  \"call_status\": \"answered\",\n  \"call_sub_status\": \"\",\n  \"call_start_time\": \"2026-08-03 10:00:00\"\n}"},"url":"https://public.origami.ms/pbx_app/endpoint_pbx/stage/","description":"<p><strong>First event for a new call</strong> (or status update while open).</p>\n<h3 id=\"required-fields\">Required fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>secret_key</code></td>\n<td>Must match PBX line config (else <strong>403</strong> <code>invalid_secret</code>)</td>\n</tr>\n<tr>\n<td><code>call_id</code></td>\n<td>Unique per call; used as omnichannel unique_id</td>\n</tr>\n<tr>\n<td><code>from</code> / <code>to</code></td>\n<td>Phone numbers (digits; normalized server-side)</td>\n</tr>\n<tr>\n<td><code>sending_type</code></td>\n<td><code>incoming</code> or <code>outgoing</code></td>\n</tr>\n<tr>\n<td><code>call_status</code></td>\n<td>e.g. <code>answered</code>, <code>busy</code>, <code>rejected</code>, <code>missed</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"recommended\">Recommended</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>extension</code></td>\n<td>Maps to user <code>origami_user_pbx_extension</code> for screen-pop</td>\n</tr>\n<tr>\n<td><code>call_sub_status</code></td>\n<td>Empty string on start; <code>call_completed</code> when hung up</td>\n</tr>\n<tr>\n<td><code>call_start_time</code></td>\n<td>Stored when answered + empty sub_status</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"success\">Success</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\"status\": 1}\n</code></pre>\n<p>HTTP <strong>200</strong>.</p>\n<h3 id=\"errors-http-code--body\">Errors (HTTP code + body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Body error</th>\n<th>When</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td>missing_secret_key</td>\n<td>no secret in body</td>\n</tr>\n<tr>\n<td>400</td>\n<td>invalid_payload</td>\n<td>(internal) missing account_id/data</td>\n</tr>\n<tr>\n<td>400</td>\n<td>missing_required_fields</td>\n<td>missing secret_key or call_id in data</td>\n</tr>\n<tr>\n<td>403</td>\n<td>invalid_secret</td>\n<td>secret mismatch</td>\n</tr>\n<tr>\n<td>404</td>\n<td>unknown_account</td>\n<td>bad account id</td>\n</tr>\n<tr>\n<td>502</td>\n<td>upstream_failure</td>\n<td>public→webserver relay failed</td>\n</tr>\n</tbody>\n</table>\n</div><p>JSON body preferred. Form fields with <code>secret_key</code> also accepted by the public controller.</p>\n","urlObject":{"path":["pbx_app","endpoint_pbx","stage",""],"host":["https://public.origami.ms"],"query":[],"variable":[{"type":"any","value":"stage","key":"account"},{"type":"any","value":"","key":"account_ukey"}]}},"response":[],"_postman_id":"5082a27c-6948-4a22-a7fa-b06986e64988"},{"name":"Incoming — call_completed + recording","id":"f5e3158c-0044-49c1-bb51-42201295b02f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret_key\": \"\",\n  \"call_id\": \"\",\n  \"from\": \"0501234567\",\n  \"to\": \"039999999\",\n  \"extension\": \"\",\n  \"sending_type\": \"incoming\",\n  \"call_status\": \"answered\",\n  \"call_sub_status\": \"call_completed\",\n  \"call_end_time\": \"2026-08-03 10:05:00\",\n  \"call_duration\": \"300\",\n  \"call_recording_link\": \"https://example.com/recordings/sample.mp3\",\n  \"call_summary\": \"Customer asked about pricing\"\n}"},"url":"https://public.origami.ms/pbx_app/endpoint_pbx/stage/","description":"<p><strong>Same <code>call_id</code> as the start event</strong>, with:</p>\n<ul>\n<li><code>call_sub_status</code>: <strong><code>call_completed</code></strong></li>\n<li>optional <code>call_end_time</code>, <code>call_duration</code>, <code>call_recording_link</code>, <code>call_summary</code></li>\n</ul>\n<p>When <code>call_recording_link</code> is a valid URL, Origami writes it to matching records across <strong>all</strong> configured entity mappings (multi-entity PBX).</p>\n<p>Set collection var <code>pbx_call_id</code> to the call_id from the start request, or paste the same id in the body.</p>\n<p><code>call_summary</code> is HTML-escaped before store.</p>\n","urlObject":{"path":["pbx_app","endpoint_pbx","stage",""],"host":["https://public.origami.ms"],"query":[],"variable":[{"type":"any","value":"stage","key":"account"},{"type":"any","value":"","key":"account_ukey"}]}},"response":[],"_postman_id":"f5e3158c-0044-49c1-bb51-42201295b02f"},{"name":"Incoming — missed","id":"aa6bb42f-7c28-4274-bc80-8ae4fdcd70a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret_key\": \"\",\n  \"call_id\": \"missed_1785824465\",\n  \"from\": \"0501234567\",\n  \"to\": \"039999999\",\n  \"extension\": \"\",\n  \"sending_type\": \"incoming\",\n  \"call_status\": \"missed\",\n  \"call_sub_status\": \"\"\n}"},"url":"https://public.origami.ms/pbx_app/endpoint_pbx/stage/","description":"<p><code>call_status: missed</code>. If line has <strong>screen_pop_on_missed</strong> and extension maps to a logged-in user, may screen-pop once (<code>screen_pop_shown</code> flag).</p>\n","urlObject":{"path":["pbx_app","endpoint_pbx","stage",""],"host":["https://public.origami.ms"],"query":[],"variable":[{"type":"any","value":"stage","key":"account"},{"type":"any","value":"","key":"account_ukey"}]}},"response":[],"_postman_id":"aa6bb42f-7c28-4274-bc80-8ae4fdcd70a2"},{"name":"Outgoing — answered","id":"c18de39f-3c36-47af-ad3e-e6f5eca1db03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret_key\": \"\",\n  \"call_id\": \"out_1785824465\",\n  \"from\": \"039999999\",\n  \"to\": \"0501234567\",\n  \"extension\": \"\",\n  \"sending_type\": \"outgoing\",\n  \"call_status\": \"answered\",\n  \"call_sub_status\": \"\"\n}"},"url":"https://public.origami.ms/pbx_app/endpoint_pbx/stage/","description":"<p><code>sending_type: outgoing</code>. Contact lookup / screen-pop path is <strong>incoming-only</strong> in code; still logs omnichannel call record and ws refresh.</p>\n","urlObject":{"path":["pbx_app","endpoint_pbx","stage",""],"host":["https://public.origami.ms"],"query":[],"variable":[{"type":"any","value":"stage","key":"account"},{"type":"any","value":"","key":"account_ukey"}]}},"response":[],"_postman_id":"c18de39f-3c36-47af-ad3e-e6f5eca1db03"},{"name":"Error demo — bad secret (expect 403)","id":"f867d37c-c563-42f9-9bf7-eb41942446af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret_key\": \"wrong-secret\",\n  \"call_id\": \"badsec_1785824465\",\n  \"from\": \"0501234567\",\n  \"to\": \"039999999\",\n  \"sending_type\": \"incoming\",\n  \"call_status\": \"answered\",\n  \"call_sub_status\": \"\"\n}"},"url":"https://public.origami.ms/pbx_app/endpoint_pbx/stage/","description":"<p>Expect HTTP <strong>403</strong> and <code>{\"status\":0,\"error\":\"invalid_secret\"}</code> when the account exists but secret is wrong.</p>\n","urlObject":{"path":["pbx_app","endpoint_pbx","stage",""],"host":["https://public.origami.ms"],"query":[],"variable":[{"type":"any","value":"stage","key":"account"},{"type":"any","value":"","key":"account_ukey"}]}},"response":[],"_postman_id":"f867d37c-c563-42f9-9bf7-eb41942446af"}],"id":"bb6a3da1-c3dd-427e-84d3-0f7857e11319","description":"<h1 id=\"pbx-app--provider-webhook-api\">PBX app — provider webhook API</h1>\n<p>Code: <code>origami-public</code> <code>Pbx_app::endpoint_pbx</code> → webserver <code>pbx_app/api_public/endpoint_pbx_app</code>.</p>\n<h2 id=\"auth-model\">Auth model</h2>\n<ul>\n<li><strong>Not</strong> Origami API <code>username</code> / <code>api_secret</code>.</li>\n<li>Per PBX <strong>line/account</strong> <code>secret_key</code> (shown in PBX app admin config).</li>\n<li>Account identity is in the URL: <code>.../endpoint_pbx/{account}/{account_ukey}</code> → internal <code>account_id = \"pbx_\" + account_ukey</code>.</li>\n</ul>\n<h2 id=\"where-to-get-values\">Where to get values</h2>\n<p>In Origami UI: <strong>PBX app → Manage config</strong> for the line:</p>\n<ul>\n<li><strong>Call entry URL</strong> → split into <code>pbx_public_base</code> + path (or paste full URL and edit)</li>\n<li><strong>Secret key</strong> → <code>pbx_secret_key</code></li>\n<li>User’s <strong>PBX extension</strong> field on origami_users → <code>pbx_extension</code> (for screen-pop to that agent)</li>\n</ul>\n<h2 id=\"what-the-webhook-does-incoming\">What the webhook does (incoming)</h2>\n<ol>\n<li>Validates payload + secret</li>\n<li>Upserts omnichannel call log by <code>call_id</code></li>\n<li>Resolves agent by extension</li>\n<li>Multi-entity phone lookup (entity mapping priority) → screen-pop View/Create</li>\n<li>On <code>call_completed</code> + recording URL → writeback to matching records across mappings</li>\n<li>Websocket refresh of call UI</li>\n</ol>\n<h2 id=\"session-only-not-external-provider\">Session-only (not external provider)</h2>\n<ul>\n<li><code>POST /pbx_app/api/outgoing_call</code> — click-to-call (logged-in user)</li>\n<li><code>POST /pbx_app/api/get_messages</code> — call log list in app UI</li>\n</ul>\n","_postman_id":"bb6a3da1-c3dd-427e-84d3-0f7857e11319"},{"name":"MCP Server","item":[{"name":"Connect Using Basic Auth","id":"4fb66710-fe9b-4a6e-be04-1d3518af297f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"https://stage.origami.ms/mcp/","description":"<p>https://{{ACCOUNT}}.origami.ms/mcp/ — Basic Auth. Tools include entity list/structure and data ops (collection note).</p>\n","urlObject":{"path":["mcp",""],"host":["https://stage.origami.ms"],"query":[],"variable":[]}},"response":[],"_postman_id":"4fb66710-fe9b-4a6e-be04-1d3518af297f"}],"id":"6e7ecc17-98cf-48ca-8082-a848ed0dd0fa","description":"<p>AI agent access via Basic Auth (not independently verified in the stage suite).</p>\n","_postman_id":"6e7ecc17-98cf-48ca-8082-a848ed0dd0fa"}],"variable":[{"key":"base_url","value":"https://stage.origami.ms"},{"key":"username","value":""},{"key":"api_secret","value":""},{"key":"entity_data_name","value":"e_76"},{"key":"instance_id","value":""},{"key":"group_data_name","value":"g_175"},{"key":"field_data_name","value":"fld_1057"},{"key":"file_id","value":""},{"key":"pbx_public_base","value":"https://public.origami.ms"},{"key":"pbx_account","value":"stage"},{"key":"pbx_account_ukey","value":""},{"key":"pbx_secret_key","value":""},{"key":"pbx_extension","value":""},{"key":"pbx_call_id","value":""}]}