Rekamedika Docs
SATUSEHAT Tenant

POST /satusehat/tenant/credentials

POST
/satusehat/tenant/credentials

SATUSEHAT proxy route (apps/server/src/satusehat/routes-tenant.ts). Requires a verified session cookie or OAuth Bearer; OAuth callers need simrs:write. Tenant + roles come from the credential — never from the request. Access tokens for the national SATUSEHAT platform stay server-side.

Authorization

AuthorizationBearer <token>

OAuth 2.0 / OIDC issued by the API itself (better-auth oidcProvider). Dynamic client registration per RFC 7591 at /api/auth/oauth2/register.

In: header

Scope: simrs:write

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

orgId*string
Length1 <= length <= 128
clientId*string
Length1 <= length <= 128
clientSecret*string
Length1 <= length
environment*string

Value in

  • "sandbox"
  • "production"
confirm?boolean

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/satusehat/tenant/credentials" \  -H "Content-Type: application/json" \  -d '{    "orgId": "string",    "clientId": "string",    "clientSecret": "string",    "environment": "sandbox"  }'
{}
{  "error": "string",  "issues": []}
{  "error": "string",  "code": "string",  "upstreamStatus": 0}
{  "error": "string",  "code": "string",  "upstreamStatus": 0}
{  "error": "string",  "code": "string",  "upstreamStatus": 0}

Is this page helpful?