/v1/user

Get a user's plan, access, and subscription history

Returns the user's current plan, whether they can use the product right now, and their subscription history.

plan: the current plan. billing_type is subscription, fee_for_service, or complimentary, and is omitted when none applies.

access: can the user use the product right now?

  • has_access: true when expires_at is null (open-ended) or in the future.
  • status: active, or pending_cancellation when a cancellation is scheduled but access continues until then. Once access has ended: disabled (you called POST /disable; stays until POST /enable), payment_failed (a renewal charge failed), or expired (anything else ran out: the trial, the subscription, or an access_expires_at you set).

trial: only present for organizations with trial access. null if the user never had a trial. Otherwise ends_at and status: active, expired, or converted (the user paid; this never reverts).

subscriptions: Stripe subscription rows, most recent first. Empty without a recurring billing relationship. is_trial means a Stripe trial on that row, not the trial above. cancel_at is set when a cancellation is scheduled. renews_at is the end of the current billing period and may stay set in that case, so check cancel_at before showing it as a renewal date.

This endpoint is not reachable for draft users; the trial starts when onboarding completes. Clients must tolerate unknown status values.

get/v1/user/{userId}/subscriptions/

Request

  • Base URL
    https://api.counselhealth.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Path parameters

userIdstring required

Headers

Idempotency-Keystring
Example:550e8400-e29b-41d4-a716-446655440000

Optional idempotency key. Repeat requests with the same key and body return the original result.

Response

Default Response

Example response

{
  "access": {
    "expires_at": "2030-01-01T00:00:00Z"
  },
  "trial": {
    "ends_at": "2030-01-01T00:00:00Z"
  },
  "subscriptions": [
    {
      "cancel_at": "2030-01-01T00:00:00Z",
      "ended_at": "2030-01-01T00:00:00Z",
      "renews_at": "2030-01-01T00:00:00Z",
      "created_at": "2030-01-01T00:00:00Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.