Skip to main content

Create Service Delegation Token

POST/api/services/:service_name/delegation-token

Exchange the authenticated user's web/API session for a short-lived service delegation token scoped to one service, organization, and scope set. This does not create a persistent Morph API key.

Request​

Path Parameters

  • service_namestringrequired

application/json

Bodyrequired

  • object
    • audiencestring

      Optional audience. When supplied it must match the target service id or name.

    • client_contextobject

      Additional properties may contain any value.

    • idempotency_keystring
    • organization_idstring

      Internal or external organization id. Defaults to the authenticated user's active organization.

    • scopesarray of stringrequired
      • Itemsstring

Responses​

Short-lived delegation token and redacted claim summary

application/json

Schema

  • object
    • access_tokenstringrequired
    • claimsobjectrequired
      • actor_typestring
      • audiencestring
      • expires_atinteger
      • issued_atinteger
      • issuerstring
      • key_idstring
      • organization_idstring
      • scopesarray of string
        • Itemsstring
      • service_idstring
      • service_namestring
      • subjectstring
      • token_idstring
    • expires_atintegerrequired
    • policyobjectrequired
      • allowed_scopesarray of string
        • Itemsstring
    • token_typestringrequired