> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yasmina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Welcome to Yasmina integration. Pioneering embedded insurance in Saudi Arabia and the region by offering seamless coverage, delivered at the perfect moment to protect your customers.

<section class="yasmina-hero">
  <img src="https://mintcdn.com/yasmina/9kSgoOR0hRqcTH_q/banner.png?fit=max&auto=format&n=9kSgoOR0hRqcTH_q&q=85&s=c9c531fc0944794e4ecf1ea8f16a9b5e" alt="Yasmina abstract green banner" width="1536" height="1024" data-path="banner.png" />

  <div class="yasmina-hero-content">
    <div class="yasmina-hero-inner">
      <div class="yasmina-hero-text">
        <h1 class="yasmina-hero-title">Yasmina AI Official Documentation</h1>

        <p class="yasmina-hero-subtitle">
          Learn how to integrate Yasmina embedded insurance smoothly into your platform.
        </p>
      </div>

      <div class="yasmina-hero-card">
        <section>
          <span class="yasmina-hero-card-eyebrow">Quick links</span>

          <a class="text-sm" href="/authentication">
            <span>Authenticate API</span>
          </a>

          <a target="_blank" class="text-sm" href="https://portal.yasmina.ai/register">
            <span>Sign up</span>
          </a>

          <a class="text-sm" href="/changelog">
            <span>Changelog</span>
          </a>
        </section>

        <section>
          <span class="yasmina-hero-card-eyebrow">
            <span>Sandbox Test API Keys</span>

            <span class="ml-2" aria-hidden="true">
              <Icon icon="box-isometric" size={16} />
            </span>
          </span>

          <div class="yasmina-secret-group">
            <div class="yasmina-secret-row">
              <span class="yasmina-secret-label text-sm">Client ID</span>

              <div class="yasmina-secret-value">
                <code class="yasmina-secret-text" title="9f757acd-1ab4-466f-8cb2-d65ddedb2374">9f757acd-1ab4-466f-8cb2-d65ddedb2374</code>

                <button type="button" class="yasmina-secret-copy" aria-label="Copy Client ID" data-copy-value="9f757acd-1ab4-466f-8cb2-d65ddedb2374" data-state="idle" data-label-idle="Copy Client ID" data-label-copied="Client ID copied" data-label-error="Copy failed, press ⌘C">
                  <span class="yasmina-secret-icon yasmina-secret-icon-idle" aria-hidden="true">
                    <Icon icon="clipboard" size={16} />
                  </span>

                  <span class="yasmina-secret-icon yasmina-secret-icon-success" aria-hidden="true">
                    <Icon icon="check" size={16} />
                  </span>
                </button>
              </div>
            </div>

            <div class="yasmina-secret-row">
              <span class="yasmina-secret-label text-sm">Client Secret</span>

              <div class="yasmina-secret-value">
                <code class="yasmina-secret-text" title="tQraH8lXWnU5uZmnIrHazAyf8of0Jm3vYlh7Nyzo">tQraH8lXWnU5uZmnIrHazAyf8of0Jm3vYlh7Nyzo</code>

                <button type="button" class="yasmina-secret-copy" aria-label="Copy Client Secret" data-copy-value="tQraH8lXWnU5uZmnIrHazAyf8of0Jm3vYlh7Nyzo" data-state="idle" data-label-idle="Copy Client Secret" data-label-copied="Client Secret copied" data-label-error="Copy failed, press ⌘C">
                  <span class="yasmina-secret-icon yasmina-secret-icon-idle" aria-hidden="true">
                    <Icon icon="clipboard" size={16} />
                  </span>

                  <span class="yasmina-secret-icon yasmina-secret-icon-success" aria-hidden="true">
                    <Icon icon="check" size={16} />
                  </span>
                </button>
              </div>
            </div>
          </div>
        </section>
      </div>
    </div>
  </div>
</section>

<section class="yasmina-try">
  <div class="yasmina-try-wrapper">
    <div class="yasmina-try-headline">
      <span class="yasmina-try-kicker">Try out Motor Insurance on Sandbox</span>
    </div>

    <div class="yasmina-try-body">
      <div class="yasmina-try-tabs" role="tablist" aria-label="Quickstart walkthrough">
        <button type="button" class="yasmina-try-tab is-active" id="yasmina-try-auth" role="tab" aria-selected="true" aria-controls="yasmina-try-panel-auth" data-try-target="auth">
          <span class="yasmina-try-tab-step">1</span>

          <span class="yasmina-try-tab-text">
            <strong>Authenticate</strong>
            <span>Exchange your client credentials for an access token.</span>
          </span>
        </button>

        <button type="button" class="yasmina-try-tab" id="yasmina-try-quote" role="tab" aria-selected="false" aria-controls="yasmina-try-panel-quote" data-try-target="quote">
          <span class="yasmina-try-tab-step">2</span>

          <span class="yasmina-try-tab-text">
            <strong>Request quote OTP</strong>
            <span>Verify the customer before requesting quotes.</span>
          </span>
        </button>

        <button type="button" class="yasmina-try-tab" id="yasmina-try-request" role="tab" aria-selected="false" aria-controls="yasmina-try-panel-request" data-try-target="request">
          <span class="yasmina-try-tab-step">3</span>

          <span class="yasmina-try-tab-text">
            <strong>Request quotes</strong>
            <span>Send the OTP and vehicle details to get multi-provider prices.</span>
          </span>
        </button>

        <button type="button" class="yasmina-try-tab" id="yasmina-try-issue-otp" role="tab" aria-selected="false" aria-controls="yasmina-try-panel-issue-otp" data-try-target="issue-otp">
          <span class="yasmina-try-tab-step">4</span>

          <span class="yasmina-try-tab-text">
            <strong>Request issue OTP</strong>
            <span>Send the customer an OTP before converting the quote.</span>
          </span>
        </button>

        <button type="button" class="yasmina-try-tab" id="yasmina-try-policy" role="tab" aria-selected="false" aria-controls="yasmina-try-panel-policy" data-try-target="policy">
          <span class="yasmina-try-tab-step">5</span>

          <span class="yasmina-try-tab-text">
            <strong>Generate payment link</strong>
            <span>Create a policy draft and retrieve the checkout URL.</span>
          </span>
        </button>
      </div>

      <div class="yasmina-try-panels">
        <div class="yasmina-try-panel is-active not-prose" id="yasmina-try-panel-auth" role="tabpanel" aria-hidden="false" aria-labelledby="yasmina-try-auth" data-try-id="auth">
          <Card title="Authenticate" className="yasmina-try-card">
            <p>You can exchange your API Keys with an Access token. This access token will then be used to access all our APIs</p>

            <CodeGroup>
              ```bash cURL theme={null}
              curl -X POST https://sandbox.yasmina.ai/oauth/token \
                -u "9f757acd-1ab4-466f-8cb2-d65ddedb2374:tQraH8lXWnU5uZmnIrHazAyf8of0Jm3vYlh7Nyzo" \
                -d "grant_type=client_credentials"
              ```

              ```javascript Node.js theme={null}
              import fetch from "node-fetch";

              const response = await fetch("https://sandbox.yasmina.ai/oauth/token", {
                method: "POST",
                headers: {
                  Authorization: `Basic ${Buffer.from(`${process.env.CLIENT_ID}:${process.env.CLIENT_SECRET}`).toString("base64")}`,
                  "Content-Type": "application/x-www-form-urlencoded"
                },
                body: "grant_type=client_credentials"
              });

              const { access_token: accessToken } = await response.json();
              console.log(accessToken);
              ```
            </CodeGroup>

            <p class="yasmina-try-footnote mt-auto not-prose">If tokens expire, you need to regenerate a new one using this API.</p>
          </Card>
        </div>

        <div class="yasmina-try-panel" id="yasmina-try-panel-quote" role="tabpanel" aria-hidden="true" aria-labelledby="yasmina-try-quote" data-try-id="quote">
          <Card title="Request a quote OTP" className="yasmina-try-card">
            <CodeGroup>
              ```bash cURL expandable=true theme={null}
              curl --location 'https://sandbox.yasmina.ai/api/v1/car-comp/quote-otp' \
                --header 'Accept: application/json' \
                --header 'Content-Type: application/json' \
                --header 'Authorization: Bearer $ACCESS_TOKEN' \
                --data-raw '{
                  "email": "motor-insurance-testing@yasmina.ai",
                  "phone": "0533XXXXXX",
                  "owner_id": "10XXXXXXXX"
              }'
              ```
            </CodeGroup>

            <p class="yasmina-try-footnote mt-auto">This endpoint sends an OTP to the provided phone number.</p>
          </Card>
        </div>

        <div class="yasmina-try-panel" id="yasmina-try-panel-request" role="tabpanel" aria-hidden="true" aria-labelledby="yasmina-try-request" data-try-id="request">
          <Card title="Request multi-provider quotes" className="yasmina-try-card">
            <CodeGroup>
              ```bash cURL expandable=true theme={null}
              curl --location 'https://sandbox.yasmina.ai/api/v1/car-comp/quote-requests' \
                --header 'Accept: application/json' \
                --header 'Content-Type: application/json' \
                --header 'Authorization: Bearer $ACCESS_TOKEN' \
                --data-raw '{
                  "otp": "2578",
                  "email": "motor-insurance-testing@yasmina.ai",
                  "owner_id": "10XXXXXXXX",
                  "phone": "0533XXXXXX",
                  "birthdate": "1989-02-17",
                  "car_sequence_number": 812309654,
                  "is_ownership_transfer": true,
                  "current_car_owner_id": "7012XXXXXX",
                  "car_estimated_cost": 52000,
                  "car_model_year": 2023
              }'
              ```
            </CodeGroup>

            <p class="yasmina-try-footnote mt-auto">Use the OTP and customer data from the previous step to retrieve prices from multiple insurers.</p>
          </Card>
        </div>

        <div class="yasmina-try-panel" id="yasmina-try-panel-issue-otp" role="tabpanel" aria-hidden="true" aria-labelledby="yasmina-try-issue-otp" data-try-id="issue-otp">
          <Card title="Request a policy issue OTP" className="yasmina-try-card">
            <CodeGroup>
              ```bash cURL expandable=true theme={null}
              curl --location 'https://sandbox.yasmina.ai/api/v1/car-comp/issue-otp' \
                --header 'Accept: application/json' \
                --header 'Content-Type: application/json' \
                --header 'Authorization: Bearer $ACCESS_TOKEN' \
                --data-raw '{
                  "email": "motor-insurance-testing@yasmina.ai",
                  "phone": "0533XXXXXX",
                  "owner_id": "10XXXXXXXX",
                  "quote_request_id": 64,
                  "quote_reference_id": "6237e1aa-cec2-440e-acb5-20bcb8e99750",
                  "quote_price_id": "3adc577e-4dc4-f011-972d-005056a9891a"
              }'
              ```
            </CodeGroup>

            <p class="yasmina-try-footnote mt-auto">Trigger an OTP confirmation to authorize issuance before moving forward.</p>
          </Card>
        </div>

        <div class="yasmina-try-panel" id="yasmina-try-panel-policy" role="tabpanel" aria-hidden="true" aria-labelledby="yasmina-try-policy" data-try-id="policy">
          <Card title="Generate a policy and payment link" className="yasmina-try-card">
            <CodeGroup>
              ```bash cURL expandable=true theme={null}
              curl --location 'https://sandbox.yasmina.ai/api/v1/car-comp/policies' \
                --header 'Accept: application/json' \
                --header 'Content-Type: application/json' \
                --header 'Authorization: Bearer $ACCESS_TOKEN' \
                --data '{
                  "benefits": [],
                  "otp": "1234",
                  "quote_request_id": 64,
                  "quote_reference_id": "6237e1aa-cec2-440e-acb5-20bcb8e99750",
                  "quote_price_id": "3adc577e-4dc4-f011-972d-005056a9891a"
              }'
              ```
            </CodeGroup>

            <p class="yasmina-try-footnote mt-auto">The response returns a policy draft and `paymentLink` you can surface to the customer.</p>
          </Card>
        </div>
      </div>
    </div>
  </div>
</section>

<div class="content-container max-w-8xl mx-auto relative" />

<div class="mdx-content max-w-8xl mint-mx-auto mint-w-full mdx-content relative mt-8 mb-14 prose prose-gray dark:prose-invert" id="content">
  <div class="mint-flex lg:mint-px-64 mint-mx-4 lg:mint-mx-0">
    <div class="mint-flex-1 mint-py-8">
      <h3 class="mt-0 inline-block text-2xl sm:text-3xl font-bold text-gray-900 tracking-tight dark:text-gray-200">
        Integration Guides
      </h3>

      <h4 class="flex whitespace-pre-wrap group font-semibold">
        <span class="cursor-pointer">Single Insurance Provider</span>
      </h4>

      <div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
        <div class="flex flex-col">
          <a href="/single-provider-integrations/car" class="text-indigo-600 hover:underline font-medium not-prose">Comprehensive
          Motor Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Seamless insurance for the cars you're selling and the drivers that are
          buying from you.</p>
        </div>

        <div class="flex flex-col">
          <a href="/single-provider-integrations/cartpl" class="text-indigo-600 hover:underline font-medium not-prose">TPL Motor
          Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Seamless TPL motor insurance for drivers and vehicles.</p>
        </div>

        <div class="flex flex-col">
          <a href="/single-provider-integrations/medical" class="text-indigo-600 hover:underline font-medium not-prose">SME
          Medical Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Facilitate efficient and automated insurance claims processes between
          Healthcare Providers and Insurance Companies.</p>
        </div>

        <div class="flex flex-col">
          <a href="/single-provider-integrations/travel" class="text-indigo-600 hover:underline font-medium not-prose">Travel
          Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Schengen travel insurance with flexible duration and multi-traveller
          options.</p>
        </div>

        <div class="flex flex-col">
          <a href="/single-provider-integrations/property" class="text-indigo-600 hover:underline font-medium not-prose">Property
          Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Embed property insurance into your platform, letting customers insure
          properties with a click.</p>
        </div>

        <div class="flex flex-col">
          <a href="/single-provider-integrations/life" class="text-indigo-600 hover:underline font-medium not-prose">Life
          Insurance (S\&P)</a>
          <p class="text-sm text-gray-600 mt-1">Life insurance integration with S\&P ratings support.</p>
        </div>
      </div>

      <h4 class="flex whitespace-pre-wrap group font-semibold">
        <span class="cursor-pointer">Multi Insurance Providers</span>
      </h4>

      <div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
        <div class="flex flex-col">
          <a href="/multi-provider-integrations/car" class="text-indigo-600 hover:underline font-medium not-prose">Comprehensive
          Motor Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Retrieve and compare quotes from multiple providers for comprehensive
          motor insurance.</p>
        </div>

        <div class="flex flex-col">
          <a href="/multi-provider-integrations/cartpl" class="text-indigo-600 hover:underline font-medium not-prose">TPL Motor
          Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Request quotes from multiple providers for TPL motor insurance.</p>
        </div>

        <div class="flex flex-col">
          <a href="/multi-provider-integrations/property" class="text-indigo-600 hover:underline font-medium not-prose">Property
          Insurance</a>
          <p class="text-sm text-gray-600 mt-1">Compare property insurance prices and providers to give customers
          options.</p>
        </div>
      </div>
    </div>
  </div>
</div>
