{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"05a737c8-5fcc-3147-0e7b-9f1e67ebd882","name":"SendJim Public API v3","description":"Version 4 of our API was released on 12/06/2023. The documentation below is for version 3. To view version 4 of our API, please click this [link](https://documenter.getpostman.com/view/1717999/2s9Ykq8gmC).\n\n<table><tbody><tr><th><br>API URL<br></th><td><div><a rel=\"noreferrer noopener nofollow\" href=\"https://{{url}}\" target=\"_blank\" url=\"https://{{url}}\">{{url}}</a></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><th><br>Help Email<br></th><td><div><a rel=\"noreferrer noopener nofollow\" href=\"https://mailto:{{help email}}\" target=\"_blank\" url=\"https://mailto:{{help email}}\">{{help email}}</a></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n<h1><br>API Authentication (High level overview)<br></h1>\n\n## API Authentication Changes From API v2 to v3\n\n1. ## **State Parameter**\n    \n    Optional parameter that you may pass to the \\~/OAuth/Account URL. The State parameter can be any string that you would like to receive back after the OAuth process is complete. More information about this is in our documentation below.\n    \n2. **API Version Header**\n    \n    - With API version 3 (and going forward) we **require** a new header to be sent with every API request. That header is called **api_version**. And you must provide the API version you wish to use. Example:\n        \n\n```\n    Authorization : Token \\[tokenValue\\]  \n    api_version: 3  \n\n ```\n\n---\n\n<p><br>API Authentication is handled via the Authorization header. This header must be sent with every request. For <b>Private Label</b> accounts, the Authorization scheme is <b>Bearer</b>. For <b>Integration Partner</b> accounts, the scheme is <b>Token</b></p>\n\n<h2>Private Label Accounts</h2>\n\n<p><br>If you signed up to use Send Jim for just your company, you have a Private Label account. You should already have API keys available. You can find them by going into your Company Profile, and clicking \"Integration Settings\" located in the top right corner.<br></p>\n\n<img src=\"{{web\">\n\n---\n\n<img src=\"{{web\">\n\n<p><br>As a Private Label, the \"OAuth Client White Listed URLs\" shown in the picture above will not be visible. The call back URLs are only for Integration Partners that have to authenticate using OAuth 2.0. Instead, private labels must authenticate using the Authorization header, with scheme \"Bearer\", along with your client key and client secret. Your client key and client secret must be concatenated, using a colon as a separator. For example: <b>CLIENT_KEY:CLIENT_SECRET</b>. Then, the concatenated credentials must be base64 encoded.<br></p>\n\n<h4>Example</h4>\n\n<p><br>Example client key: <b>123M56789</b><br><br>Example client secret: <b>00xyzw2</b></p>\n\n<ol><li><div><br>First, concatenate using colon<br></div><ul><li><div><b>123M56789:00xyzw2</b></div></li></ul></li><li><div><br>Then, base64 encode the value<br></div><ul><li><div><b>MTIzTTU2Nzg5OjAweHl6dzI=</b></div></li></ul></li><li><div><br>Finally, create your Authorization HTTP Header<br></div><ul><li><div><b><br>Authorization Bearer MTIzTTU2Nzg5OjAweHl6dzI=<br></b></div></li></ul></li><li><div><br>Make sure to pass that HTTP header with every request<br></div></li></ol>\n\n<h2>Integration Partner Accounts</h2>\n\n<p><br>If you would like to authenticate <i>other</i> send jim customers, and use our API with their accounts, then you are an integration partner and must use OAuth 2.0 authentication.<br></p>\n\n<p><br>The OAuth 2.0 process is as follows:<br></p>\n\n<ol><li><div><br>First, make sure you have white listed call back urls in the \"Integration Settings\" within the Company Profile page<br></div></li><li><div><br>Then, redirect the user to the following URL, passing along your client key and one of your white listed call back URLs as query parameters<br></div><ul><li><div><b>{{web url}}/OAuth/Account?clientKey=CLIENT_KEY&amp;callbackUrl=[WHITE_LISTED_CALLBACK_URL]</b></div></li><li><div><br>Optionally, you can send a \"<b>state</b>\" parameter to the authentication URL above. The \"<b>state</b>\" parameter can contain any string data that is relevant to your application. After a successful authentication, we will send the \"<b>state</b>\" value to your white-listed redirect URL.<br></div></li></ul></li><li><div><br>The user will be presented with a login form to connect with your company. If the user is already logged in, they will skip the login form and be asked if they would like to share their information with your company.<br><br><br></div><figure editor=\"[object Object]\"><div contenteditable=\"false\"><div><img src=\"{{web url}}/Content/ApiDocumentationResources/OAuth2Login.png\" alt=\"\"><div><div></div><div><div></div></div><div></div><div><div></div></div><div></div><div></div><div></div><div></div></div></div></div></figure><div><hr contenteditable=\"false\"></div><figure editor=\"[object Object]\"><div contenteditable=\"false\"><div><img src=\"{{web url}}/Content/ApiDocumentationResources/OAuth2AllowAccess.png\" alt=\"\"><div><div></div><div><div></div></div><div></div><div><div></div></div><div></div><div></div><div></div><div></div></div></div></div></figure></li><li><div><br>Once the user allows access to your application, the user will be redirected to the call back URL you passed as a query parameter. <b>Reminder: This URL must be white listed in your company profile's integration settings page.</b></div><ul><li><div><b><br>http://yourapp.com/callback_url?requestToken=1aa8d6ad-f2c5-4979-91bc-fd656123c945&amp;expires=3599<br></b></div></li></ul></li><li><div><br>As seen above, SendJim.io will send a request token and an expiration timer to your callback URL. (Note: The expiration integer represents the number of seconds from now that the request token will expire)<br></div></li><li><div><br>If a \"<b>state</b>\" parameter was provided during the authentication process, we will append the <b>state</b> parameter and value to your redirect URL above.<br></div></li><li><div><br>Next, using your client key, secret key, and your newly acquired request token, create a POST request to:<br></div><ul><li><div><b>{{web url}}/OAuth/Grant</b></div></li><li><div><br>JSON Body<br><br><br><br><br><br></div><figure editor=\"[object Object]\"><div contenteditable=\"false\"><div><img src=\"{{web url}}/Content/ApiDocumentationResources/OAuth2RequstBodyForAccessToken.png?v1\" alt=\"\"><div><div></div><div><div></div></div><div></div><div><div></div></div><div></div><div></div><div></div><div></div></div></div></div></figure></li></ul></li><li><div><br>Finally, you will receive a JSON response back with the following properties:<br><br><br></div><table><tbody><tr><th><br>GrantToken<br></th><td><div><br>String<br></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><th><br>UserFirstName<br></th><td><div><br>String<br></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><th><br>UserLastName<br></th><td><div><br>String<br></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><th><br>Username<br></th><td><div><br>String<br></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table></li><li><div><br>You can now store the Grant Token and send it with every future request for this user. The token must be present in the Authorization header in every API call. Like so:<br></div><ul><li><div><b><br>Authorization Token GRANT_TOKEN_GOES_HERE<br></b></div></li></ul><div><b>Note</b> - The Grant Token does not expire<br></div></li></ol>\n\n<h2><br>Conclusion<br></h2>\n\n<p><br>For the authorization headers in the APIs documented below, we will be using the Integration Partner authentication process (OAuth 2.0 Token).<br></p>\n\n<p><br>If you have any questions, please dont hesitate to contact us at {{help email}}.<br></p>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1717999","team":37199,"collectionId":"05a737c8-5fcc-3147-0e7b-9f1e67ebd882","publishedId":"6Z2Qshq","public":true,"publicUrl":"https://documenter-api.postman.tech/view/1717999/6Z2Qshq","privateUrl":"https://go.postman.co/documentation/1717999-05a737c8-5fcc-3147-0e7b-9f1e67ebd882","customColor":{"top-bar":"FFFFFF","right-sidebar":"233646","highlight":"3E88C8"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2018-05-21T13:10:07.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"SendJim - Prod v3","id":"5876b3a1-651b-aa22-0227-3e0365b1a9de","owner":"1717999","values":[{"key":"url","value":"https://api.sendjim.com/api","enabled":true,"type":"text"},{"key":"SessionKey","value":"undefined","enabled":true,"type":"text"},{"key":"help email","value":"support@sendjim.com","enabled":true,"type":"text"},{"key":"web url","value":"https://members.sendjim.com","enabled":true,"type":"text"},{"key":"token","value":"ZjYwNzQzNWEtZjc3My00ZTFhLWE1OTItY2FhMTU0OThmZThkZTAzYjdiNGQtMmExMy00NjlkLWFjNzItYzRhNTk3NzIwMzhk","enabled":true,"type":"text"},{"key":"testTag","value":"Test Tag","enabled":true,"type":"text"},{"key":"activeContactId","value":"720161","enabled":true,"type":"text"},{"key":"inactiveContactId","value":"344151","enabled":true,"type":"text"},{"key":"emailQuickSendId","value":"3566","enabled":true,"type":"text"},{"key":"postCardQuickSendId","value":"73461","enabled":true,"type":"text"}],"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/3e73b6c552545956cd49a51fef8650b9dcce997091d5bf899d796c4b5b0c2bb3","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"},{"label":"SendJim - Prod v3","value":"1717999-5876b3a1-651b-aa22-0227-3e0365b1a9de"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/6Z2Qshq"}