Skip to main content
POST
/
api
/
v1
/
auth
/
login
Login
curl --request POST \
  --url https://sdp.suki.ai/api/v1/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "partner_id": "your-partner-id",
  "partner_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "provider_id": "provider-123"
}
'
import requests

url = "https://sdp.suki.ai/api/v1/auth/login"

payload = {
    "partner_id": "your-partner-id",
    "partner_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
    "provider_id": "provider-123"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    partner_id: 'your-partner-id',
    partner_token: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...',
    provider_id: 'provider-123'
  })
};

fetch('https://sdp.suki.ai/api/v1/auth/login', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sdp.suki.ai/api/v1/auth/login",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'partner_id' => 'your-partner-id',
    'partner_token' => 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...',
    'provider_id' => 'provider-123'
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sdp.suki.ai/api/v1/auth/login"

	payload := strings.NewReader("{\n  \"partner_id\": \"your-partner-id\",\n  \"partner_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"provider_id\": \"provider-123\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://sdp.suki.ai/api/v1/auth/login")
  .header("Content-Type", "application/json")
  .body("{\n  \"partner_id\": \"your-partner-id\",\n  \"partner_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"provider_id\": \"provider-123\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://sdp.suki.ai/api/v1/auth/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"partner_id\": \"your-partner-id\",\n  \"partner_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"provider_id\": \"provider-123\"\n}"

response = http.request(request)
puts response.read_body
{
  "suki_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
{
  "code": 401,
  "message": "invalid token"
}
{
  "code": 403,
  "message": "forbidden"
}
{
  "code": 404,
  "message": "not found"
}
{
  "code": 500,
  "message": "internal server error"
}
Use this endpoint to authenticate a . On a successful request, this endpoint returns a (suki_token/sdp_suki_token) that you must use to authorize all subsequent API calls for that user. The suki_token is a that is valid for one hour. It contains the user, organization, and information needed to access Suki services.
If you are using the JWT Bearer/Assertion authentication method, the response may also include an additional jwt_bearer field.

Code examples

import requests

url = "https://sdp.suki-stage.com/api/v1/auth/login"

payload = {
    "partner_id": "your-partner-id",
    "partner_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
    "provider_id": "provider-123"  # Optional
}

response = requests.post(url, json=payload)

if response.status_code == 200:
    data = response.json()
    suki_token = data["suki_token"]
    print(f"Authentication successful. Token: {suki_token}")
else:
    print(f"Authentication failed: {response.status_code}")
    print(response.json())

Body

application/json

Partner credentials from onboarding. Bearer partners must also include provider_id.

partner_id
string
required

Unique identifier for the partner. This will be shared securely by Suki to the partner through a separate partner registration process.

Example:

"your-partner-id"

partner_token
string
required

JWT token issued by trusted authorization server. The token must include Provider Email.

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

provider_id
string

Optional - Unique identifier for the provider. This is required for Bearer type partners only and will be ignored for other partner types. This must match a pre-defined expression.

Example:

"provider-123"

Response

Request succeeded.

Suki access token returned after successful Login.

suki_token
string

JWT access token for the authenticated provider. Pass this value as sdp_suki_token on subsequent requests. Expires after one hour.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"

Last modified on May 22, 2026