{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/guides/sidebars.yaml","api-docs-docs/openapi/health-v1.yaml":"api-docs-docs/openapi/health-v1.yaml"},"props":{"metadata":{"markdoc":{"tagList":["openapi-code-sample","json-schema"]},"type":"markdown"},"seo":{"title":"Quickstart"},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"quickstart","__idx":0},"children":["Quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get your first authenticated call working in a few minutes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-provision-a-service-user","__idx":1},"children":["1. Provision a service user"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentication is delegated to DeepCloud's IdP (Keycloak) — there is no DeepCredentials portal step to mint credentials. Before continuing, you need:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["partner client"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Partner-Service-Client-ID"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Partner-Service-Client-Secret"]},") — request one from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"mailto:development@deepcloud.swiss"},"children":["development@deepcloud.swiss"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["service user"]}," under that partner client, authorized by the owner of the end-client organization you want to act on. You receive a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["service_account_username"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["service_account_password"]}," per end client."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["organization UUID"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Org-Id"]},") the service user is a member of."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Full walkthrough: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/authentication/service-users"},"children":["Authentication — Service Users"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-get-an-access-token","__idx":2},"children":["2. Get an access token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Exchange the credentials for a Bearer JWT against the DeepCloud SSO realm. Test environment uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["int.deepcloud.swiss"]},"; production uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deepcloud.swiss"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://deepcloud.swiss/auth/realms/sso/protocol/openid-connect/token\" \\\n  --data-urlencode \"grant_type=password\" \\\n  --data-urlencode \"username=<service_account_username>\" \\\n  --data-urlencode \"password=<service_account_password>\" \\\n  --data-urlencode \"client_id=<Partner-Service-Client-ID>\" \\\n  --data-urlencode \"client_secret=<Partner-Service-Client-Secret>\" \\\n  --data-urlencode \"scope=deepcredentials.verify\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scope depends on the pillar you use."]}," Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deepcredentials.verify"]}," for verification, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deepcredentials.issue"]}," for issuance, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deepcredentials.self-service"]}," for self-service. Pass multiple scopes space-separated — for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scope=deepcredentials.verify deepcredentials.issue"]}," — if your integration spans more than one pillar."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," (valid 15 min) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refresh_token"]},". Cache the access token and reuse until near expiry."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-call-the-health-endpoint","__idx":3},"children":["3. Call the health endpoint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm your token works against the API:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/openapi/health-v1"},"children":["Open in API reference →"]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"api-docs-docs/openapi/health-v1.yaml","operationId":"GET:b2b.Health","parameters":{},"environments":{"https://api.dev.deepcredentials.swiss":{"BearerAuth":"YOUR_ACCESS_TOKEN"}},"environment":"https://api.dev.deepcredentials.swiss","codeSamplesResolved":[{"lang":"shell","title":"curl","source":"curl -i -X GET \\\n  https://api.dev.deepcredentials.swiss/b2b/v1/health \\\n  -H 'X-Environment: beta' \\\n  -H 'X-Org-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08'"},{"lang":"javascript","title":"JavaScript","source":"const resp = await fetch(\n  `https://api.dev.deepcredentials.swiss/b2b/v1/health`,\n  {\n    method: 'GET',\n    headers: {\n      'X-Org-Id': '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      'X-Environment': 'beta'\n    }\n  }\n);\n\nconst data = await resp.text();\nconsole.log(data);"},{"lang":"javascript","title":"Node.js","source":"import fetch from 'node-fetch';\n\nasync function run() {\n  const resp = await fetch(\n    `https://api.dev.deepcredentials.swiss/b2b/v1/health`,\n    {\n      method: 'GET',\n      headers: {\n        'X-Org-Id': '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n        'X-Environment': 'beta'\n      }\n    }\n  );\n\n  const data = await resp.text();\n  console.log(data);\n}\n\nrun();"},{"lang":"python","title":"Python","source":"import requests\n\nurl = \"https://api.dev.deepcredentials.swiss/b2b/v1/health\"\n\nheaders = {\n  \"X-Org-Id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n  \"X-Environment\": \"beta\"\n}\n\nresponse = requests.get(url, headers=headers)\n\ndata = response.json()\nprint(data)"},{"lang":"java","title":"Java","source":"import java.net.*;\nimport java.net.http.*;\nimport java.util.*;\n\npublic class App {\n  public static void main(String[] args) throws Exception {\n    var httpClient = HttpClient.newBuilder().build();\n\n    var host = \"https://api.dev.deepcredentials.swiss\";\n    var pathname = \"/b2b/v1/health\";\n    var request = HttpRequest.newBuilder()\n      .GET()\n      .uri(URI.create(host + pathname ))\n      .header(\"X-Org-Id\", \"497f6eca-6276-4993-bfeb-53cbbbba6f08\")\n      .header(\"X-Environment\", \"beta\")\n      .build();\n\n    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n    System.out.println(response.body());\n  }\n}"},{"lang":"csharp","title":"C#","source":"using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class Program\n{\n  public static async Task Main()\n  {\n    System.Net.Http.HttpClient client = new()\n    {\n      DefaultRequestHeaders =\n      {\n        {\"X-Org-Id\", \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"},\n        {\"X-Environment\", \"beta\"},\n      }\n    };\n\n    using HttpResponseMessage request = await client.GetAsync(\"https://api.dev.deepcredentials.swiss/b2b/v1/health\");\n    string response = await request.Content.ReadAsStringAsync();\n\n    Console.WriteLine(response);\n  }\n}"},{"lang":"php","title":"PHP","source":"/**\n * Requires libcurl\n */\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_HTTPHEADER => [\n    \"X-Environment: beta\",\n    \"X-Org-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  CURLOPT_URL => \"https://api.dev.deepcredentials.swiss/b2b/v1/health\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\ncurl_close($curl);\n\nif ($error) {\n  echo \"cURL Error #:\" . $error;\n} else {\n  echo $response;\n}"},{"lang":"go","title":"Go","source":"package main\n\nimport (\n  \"fmt\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n  reqUrl := \"https://api.dev.deepcredentials.swiss/b2b/v1/health\"\n  req, err := http.NewRequest(\"GET\", reqUrl, nil)\n  if err != nil {\n    panic(err)\n  }\n  req.Header.Add(\"X-Org-Id\", \"497f6eca-6276-4993-bfeb-53cbbbba6f08\")\n  req.Header.Add(\"X-Environment\", \"beta\")\n  res, err := http.DefaultClient.Do(req)\n  if err != nil {\n    panic(err)\n  }\n  defer res.Body.Close()\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(res)\n  fmt.Println(string(body))\n}"},{"lang":"ruby","title":"Ruby","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI('https://api.dev.deepcredentials.swiss/b2b/v1/health')\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest['X-Org-Id'] = '497f6eca-6276-4993-bfeb-53cbbbba6f08'\nrequest['X-Environment'] = 'beta'\n\nresponse = http.request(request)\nputs response.read_body\n"},{"lang":"r","title":"R","source":"library(httr)\n\nurl = \"https://api.dev.deepcredentials.swiss/b2b/v1/health\"\n\ndata_req <- GET(\n  url,\n  add_headers(\"X-Org-Id\" = \"497f6eca-6276-4993-bfeb-53cbbbba6f08\", \"X-Environment\" = \"beta\"),\n  verbose()\n)\n\ncontent(data_req)"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every B2B request needs three headers:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Header"},"children":["Header"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bearer <access_token>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Org-Id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID of the organization the call acts on"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["beta"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["production"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response","__idx":4},"children":["Response"]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"$ref":"../openapi/health-v1.yaml#/paths/~1b2b~1v1~1health/get/responses/200/content/application~1json/schema"},"options":{},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"$ref":"#/components/schemas/schema"},"schema":{"properties":{"environment":{"description":"Environment scoping the call (from X-Environment).","type":"string"},"label":{"description":"Human-readable label sourced from the JWT (e.g. preferred_username for service\naccounts).","type":"string"},"org_id":{"type":"string","format":"uuid","description":"UUID v4 identifier.","example":"550e8400-e29b-41d4-a716-446655440000"},"scopes":{"items":{"type":"string"},"description":"Scopes granted to this service user (from the JWT `scope` claim).","type":"array"},"service_user_id":{"type":"string","format":"uuid","description":"UUID v4 identifier.","example":"550e8400-e29b-41d4-a716-446655440000"},"status":{"description":"Always \"ok\" when the request is authenticated.","type":"string"},"timestamp":{"description":"Response time in RFC3339 UTC (for client logging and skew checks).","type":"string"}},"required":["status","timestamp","service_user_id","org_id","environment","label","scopes"],"type":"object"}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You're ready. Your credentials are valid and your integration can reach the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":5},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/authentication/service-users"},"children":["Authentication — Service Users"]}," — Full reference for the auth model and scopes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/verification-flow"},"children":["Verification Flow"]}," — Create sessions, display QR codes, and retrieve results."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/issuance-flow"},"children":["Credential Issuance Flow"]}," — Create and deliver credential offers."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/self-service/quickstart"},"children":["Self-Service"]}," — Decide on end-user-initiated requests via webhook."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/webhooks"},"children":["Webhooks"]}," — Receive real-time events."]}]}]},"headings":[{"value":"Quickstart","id":"quickstart","depth":1},{"value":"1. Provision a service user","id":"1-provision-a-service-user","depth":2},{"value":"2. Get an access token","id":"2-get-an-access-token","depth":2},{"value":"3. Call the health endpoint","id":"3-call-the-health-endpoint","depth":2},{"value":"Response","id":"response","depth":3},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Quickstart"}},"lastModified":"2026-06-10T12:08:36.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/guides/quickstart","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}