{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Referral API Quickstart Guide","description":"RAI Partners API."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"referral-api-quickstart-guide","__idx":0},"children":["Referral API Quickstart Guide"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This quickstart guide will help you get started with the Referral API, allowing you to make your first API call."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-retrieve-your-client_id-and-client_secret","__idx":1},"children":["Step 1: Retrieve your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Login your email."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Look for an email from ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["raipartners.com"]}]}," with subject ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Referral API"]}]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Grab your client_id and initial client_secret."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}," are required to authenticate all API requests."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-make-your-first-api-request","__idx":2},"children":["Step 2: Make Your First API Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Let's start by rotating your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}," to replace your existing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-authenticate","__idx":3},"children":["Step 1: Authenticate"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can call any API endpoint, you must authenticate using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}," originally provided by your RAI Partners' Client Success representative via email."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"retrieving-jwt-token","__idx":4},"children":["Retrieving JWT Token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the following ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["curl"]}," command to authenticate:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST https://api.raipartners.com/referral/auth/token \\\n-H \"Content-Type: application/json\" \\\n-H 'accept: application/json' \\\n-H 'API-Version: 2.0.0' \\\n-d '{\n  \"client_id\": \"<YOUR_CLIENT_ID>\",\n  \"client_secret\": \"<YOUR_CLIENT_SECRET>\"\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}]},": The client_id assigned to your company."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}]},": The associated client secret."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response-example","__idx":5},"children":["Response Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"scope\": \"read:user write:user\",\n  \"refresh_expires_in\": 300,\n  \"token_type\": \"Bearer\",\n  \"not-before-policy\": 0,\n  \"access_token\": \"eyo.....\",\n  \"expires_in\": 300\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"rotating-the-client_secret","__idx":6},"children":["Rotating the client_secret"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Grab the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," value from the authentication cal then"," ","use the following ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["curl"]}," command to rotate the client_secret:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST https://api.raipartners.com/referral/auth/client-secret/rotation \\\n-H \"Content-Type: application/json\" \\\n-H 'accept: application/json' \\\n-H 'API-Version: 2.0.0' \\\n-H Authorization: Bearer YOUR_ACCESS_TOKEN\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-example-1","__idx":7},"children":["Response Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"secret\": \"PX4eWb9rcRT1RBqvLw4GtuqyoUFWoGLr\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This response confirms that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}," has been successfully rotated and provides the new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]},"."]}]},"headings":[{"value":"Referral API Quickstart Guide","id":"referral-api-quickstart-guide","depth":1},{"value":"Step 1: Retrieve your client_id and client_secret","id":"step-1-retrieve-your-client_id-and-client_secret","depth":2},{"value":"Step 2: Make Your First API Request","id":"step-2-make-your-first-api-request","depth":2},{"value":"Step 1: Authenticate","id":"step-1-authenticate","depth":2},{"value":"Retrieving JWT Token","id":"retrieving-jwt-token","depth":3},{"value":"Response Example:","id":"response-example","depth":4},{"value":"Rotating the client_secret","id":"rotating-the-client_secret","depth":3},{"value":"Response Example","id":"response-example-1","depth":3}],"frontmatter":{"seo":{"title":"Referral API Quickstart Guide"}},"lastModified":"2026-07-01T03:36:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/referral-api/v2/quickstart","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}