{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"6c308146-d459-4753-a1d0-1a4382ad4bbd","name":"rzilient API v1","description":"## Getting Started\n\nWelcome to the rzilient Partner API (v1.2.0). This document covers the authentication model, pagination conventions, and rate-limiting behaviour you should be aware of before making your first request.\n\n---\n\n#### Environments\n\nTwo environments are available:\n\n| Environment | Base URL |\n| --- | --- |\n| Sandbox | `https://api-staging.rzilient.tech` |\n| Production | `https://api.rzilient.tech` |\n\nStart in sandbox. Switch to production only once your integration is validated end-to-end.\n\nIf you are not yet a rzilient partner, contact our sales team to arrange a demo and onboarding.\n\n---\n\n#### Authentication\n\nThe Partner API uses **OAuth 2.1 — Client Credentials grant**. This is a machine-to-machine flow: your application authenticates directly using its own credentials, with no user interaction required.\n\n##### Step 1 — Register an OAuth Application\n\nLog in to your rzilient partner dashboard and navigate to **Settings → API → OAuth Applications**. Create a new application to receive your credentials:\n\n- `client_id` — a stable public identifier for your application\n    \n- `client_secret` — a secret shown **once** at creation time; store it securely immediately\n    \n\nIf you need to rotate your secret, revoke the application and register a new one. Lost secrets cannot be recovered.\n\n##### Step 2 — Obtain an Access Token\n\nExchange your credentials for a short-lived access token by posting to the token endpoint:\n\nhttp\n\n```\nPOST /api/external/v1/oauth/token HTTP/1.1\nHost: api-staging.rzilient.tech\nContent-Type: application/json\nAccept: application/json\n{\n  \"grant_type\": \"client_credentials\",\n  \"client_id\": \"your_client_id\",\n  \"client_secret\": \"your_client_secret\"\n}\n\n ```\n\nA successful response:\n\njson\n\n```\n{\n  \"access_token\": \"eyJhbGciOiJIUzI1NiJ9...\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600\n}\n\n ```\n\nTokens expire after 1 hour. Request a new one before expiry — do not wait for a `401` to refresh.\n\n##### Step 3 — Authenticate Requests\n\nInclude the access token in every request as a Bearer header:\n\nhttp\n\n```\nAuthorization: Bearer eyJhbGciOiJIUzI1NiJ9...\n\n ```\n\nExample:\n\nhttp\n\n```\nGET /api/external/v1/devices HTTP/1.1\nHost: api.rzilient.tech\nAccept: application/json\nAuthorization: Bearer eyJhbGciOiJIUzI1NiJ9...\n\n ```\n\n##### Security Notes\n\n- Never include your `client_secret` in client-side code, browser environments, or mobile applications.\n    \n- Revoke a compromised application immediately from the dashboard and issue a new one.\n    \n- All API calls must originate from your backend — our CORS policy does not permit cross-origin browser requests from domains outside `rzilient.club` and `rzilient.tech`.\n    \n\n---\n\n#### Pagination\n\nAll collection endpoints support page-based pagination via query parameters. Responses include both a `meta` body object and response headers.\n\n##### Query parameters\n\n| Parameter | Type | Default | Max | Description |\n| --- | --- | --- | --- | --- |\n| `page` | integer | `1` | — | Page number (1-indexed) |\n| `per` | integer | `50` | `100` | Records per page |\n| `limit` | integer | — | `100` | Shorthand for `per` on page 1; takes precedence over `per` when both are present |\n\n##### Response headers\n\nEvery paginated response includes:\n\n| Header | Description |\n| --- | --- |\n| `X-Total-Count` | Total number of records matching the query |\n| `X-Total-Pages` | Total number of pages |\n| `X-Current-Page` | Current page number |\n| `X-Per-Page` | Records per page for this response |\n\n##### Response body\n\nThe `meta` key is present on all collection responses:\n\njson\n\n```\n{\n  \"meta\": {\n    \"page\": 2,\n    \"per\": 25,\n    \"total\": 143,\n    \"pages\": 6\n  },\n  \"devices\": [...]\n}\n\n ```\n\n##### Example\n\nhttp\n\n```\nGET /api/external/v1/devices?page=2&per=25 HTTP/1.1\nAuthorization: Bearer ...\n\n ```\n\n---\n\n#### Rate Limits\n\nRate limiting is enforced per authenticated identity (derived from your Bearer token) via [Rack::Attack](https://github.com/rack/rack-attack). The limits below apply to partner integrations using the external API surface (`/api/external/v1/\\\\\\\\\\*`).\n\n| Scope | Limit | Window | Notes |\n| --- | --- | --- | --- |\n| General API calls | **300 req** | 60 s | Per authenticated partner token |\n| `GET /devices/\\\\\\\\\\*` | **100 req** | 60 s | Per identity |\n| `POST/PUT/PATCH/DELETE /devices/\\\\\\\\\\*` | **60 req** | 60 s | Per identity |\n| `POST /clients/upload` | **10 req** | 60 s | Bulk upload endpoint |\n| Unauthenticated requests | **30 req** | 60 s | Should be near zero in production |\n\nWhen a limit is exceeded, the API responds with:\n\nhttp\n\n```\nHTTP/1.1 429 Too Many Requests\nRetry-After: 60\nRateLimit-Remaining: 0\nContent-Type: application/json\n{\n  \"error\": \"rate_limited\",\n  \"retry_after\": 60\n}\n\n ```\n\nRespect the `Retry-After` header before retrying. Identities that trip throttle rules repeatedly (5 times within 30 minutes) are blocked for 1 hour. Ensure your integration does not contain retry loops without backoff — exponential backoff with jitter is strongly recommended.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"15540692","team":1811591,"collectionId":"6c308146-d459-4753-a1d0-1a4382ad4bbd","publishedId":"TzRSg7ig","public":true,"publicUrl":"https://developers.rzilient.tech","privateUrl":"https://go.postman.co/documentation/15540692-6c308146-d459-4753-a1d0-1a4382ad4bbd","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.6","publishDate":"2024-03-22T07:08:25.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Sandbox","id":"bb684837-a906-4999-aa89-6b006ee70a1c","owner":"15540692","values":[{"key":"url","value":"https://api-staging.rzilient.tech","enabled":true},{"key":"user","value":"eduard@rzilient.club","enabled":true,"type":"default"},{"key":"password","value":"FUxzVxvmxTgYD6bQ8fur","enabled":true,"type":"secret"},{"key":"referalHeader","value":"whsec_lDWURChKd25LLpBEvpeqgzykVeBC1z5M","enabled":true,"type":"secret"},{"key":"externalToken","value":"XFb4c3xuI4R8elTofQJcP7vg2WouWwHMhFVn4IeOzM0=","enabled":true,"type":"secret"},{"key":"providerToken","value":"s3CqCEBiUjUDE9t+aMKCoSaesC32Aa3Avm3DyRTMXOw=","enabled":true,"type":"secret"},{"key":"id","value":"57eefa15-cc58-4acc-bb8b-c32500ff17b2","enabled":true},{"key":"order_id","value":"7d572875-dd05-4c62-8d7a-d8f0e93526e6","enabled":true},{"key":"metacallURL","value":"https://api.metacall.io/murgul/siot-catalyst/v1","enabled":true,"type":"default"},{"key":"Client Id","value":"{{client_id}}","enabled":true,"type":"default"},{"key":"Order Id","value":"{{order_id}}","enabled":true,"type":"default"},{"enabled":true,"key":"Device Id","value":"","type":"default"}],"published":true}],"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/fb1bdfb7c31bc2519bcfb6754b67321024abc3dedf33c49695fd8b47999470ba","favicon":"https://rzilient.tech/favicon.ico"},"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"},{"label":"Sandbox","value":"15540692-bb684837-a906-4999-aa89-6b006ee70a1c"}],"canonicalUrl":"https://developers.rzilient.tech/view/metadata/TzRSg7ig"}