{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"561b9ff0-5172-43b6-a761-861c0f0295a6","name":"Origami API Documentation","description":"# Origami Public API Documentation\n\nVerified against **code** (`origami-webserver` allow_api_external_access + field pipeline) and **stage.origami.ms** (2026-08-02 session harness + phone write/readback).\n\n**Local full refs:** `Origami_API_Complete_Reference.md` v2.0 · `Origami_API_Make_Field_Shapes.md` · `Origami_Finance_API_Documentation.md`\n\n## Collection variables\n| Variable | Meaning |\n|----------|---------|\n| `base_url` | e.g. `https://stage.origami.ms` or `https://YOUR_ACCOUNT.origami.ms` |\n| `username` | API user email |\n| `api_secret` | `OGMI-…` (must match the account in base_url) |\n| `entity_data_name` | e.g. `e_76` from List All Entities |\n| `instance_id` | Record Mongo `_id` |\n| `group_data_name` | e.g. `g_175` from entity_structure |\n| `field_data_name` | e.g. `fld_1057` |\n\n\n## Platform rules (verified)\n1. Errors often return **HTTP 200** + `{\"error\":...}` — always branch on body.\n2. Filters MUST be array-of-arrays: `[[\"fld\",\"=\",\"val\"],...]`. Wrong shape (array of objects) **silently returns ALL records** (stage-confirmed).\n3. Pagination is ONLY `\"limit\": [skip, count]`. `page` / `offset` do nothing.\n4. Request flag `\"normalized\":\"1\"` flattens the response and **DROPS** phone `normalize` (country code) and field metadata.\n5. Auth is body `username` + `api_secret` (OGMI-…). Secrets are **per account** — webmark secret does not work on stage.\n6. Prefer `Content-Type: application/json` + `/format/json` URL suffix (except archive_action, multipart upload).\n\n\n## Phone field (`input-telephone`) — nested read only\nWhen reading WITHOUT `normalized:\"1\"`, a phone field may look like:\n```json\n{\n  \"value\": \"501234567\",\n  \"normalize\": {\n    \"country_code\": \"972\",\n    \"normalized_short\": \"501234567\",\n    \"normalize_full\": \"972501234567\"\n  }\n}\n```\n- No key named `prefix` — use `normalize.country_code` (no `+`).\n- `normalize` is **optional** (missing on some legacy/unparseable values).\n- Stage write `\"+972501234567\"` → read `value:\"501234567\"` + full normalize object.\n\n\n## External endpoint map\n- **Entities:** 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\n- **Invoices:** create_invoice, instance_data\n- **UI:** push_notification, translate\n- **Omnichannel:** new_message\n\n## Changelog\n- **2026-08-02 (v2 sync):** 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.\n- **2026-07-31:** delivery_note/work_order, file POST download, push minutes, external_unique_id draft.\n\n## PBX app (folder 16)\nProvider webhook — **not** username/api_secret auth. Uses per-line `secret_key`.\n\n**Public URL** (from PBX admin “call entry URL”):\n`{PUBLIC_URL}pbx_app/endpoint_pbx/{ORIGAMI_ACCOUNT}/{account_ukey}`\n\nExample: `https://public.origami.ms/pbx_app/endpoint_pbx/stage/1712345678_12345`\n\nPublic relay → internal `pbx_app/api_public/endpoint_pbx_app` with:\n`{ account_id: \"pbx_\"+account_ukey, data: <payload>, external_service_name: \"pbx_app_external\" }`\n\n**Payload fields (admin lang docs + code):** 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.\n\n**HTTP errors (code):** 400 invalid_payload / missing_required_fields / missing_secret_key · 403 invalid_secret · 404 unknown_account · 200 status:1 · 502 upstream_failure (relay).\n\nSession-only UI APIs (not in this folder): `pbx_app/api/get_messages`, `outgoing_call` (browser session).\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"2653695","team":1916299,"collectionId":"561b9ff0-5172-43b6-a761-861c0f0295a6","publishedId":"2s93kz65gS","public":true,"publicUrl":"https://documenter-api.postman.tech/view/2653695/2s93kz65gS","privateUrl":"https://go.postman.co/documentation/2653695-561b9ff0-5172-43b6-a761-861c0f0295a6","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.2","publishDate":"2024-05-28T08:26:06.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/49b7831abf6b073b8f264ae729058bd9d4d935b11c8d9f7a21b7e24169adf5a3","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s93kz65gS"}