Skip to main content

Subscriptions

A subscription books the licenses of a directory per tier. These endpoints do what the Billing page in Sally does: read how many licenses are available, assigned and free, list the subscriptions, start one through a Stripe checkout link and change the number of licenses. Only owners and administrators can use them. A directory managed by a reseller partner is booked by its partner, so these endpoints answer 409 MANAGED_BY_RESELLER_PARTNER there.

To take a license away from a single member, use PATCH …/memberships/{userId} on Directories & members. How both fit together is shown in the guide Clean up licenses automatically.

Every endpoint below shows its parameters and response fields in the middle. On the right you find request samples in cURL, JavaScript and Python, an example response and Try it, which sends the request for real with your own token.

Returns the license statistics of the directory​

GET/v1.0/directories/{directoryId}/license-statisticsTry it →

Per tier: licenses available, assigned and free, split into the individual contract with Sally and the online subscriptions. Computed exactly like the Billing page in Sally: assigned licenses fill the individual contract first, only the rest counts against the subscriptions. Only owners and administrators.

Path parameters

  • directoryIdstringrequired

    Id of the directory (the Sally company account) the resource belongs to. The directories a token can address are listed by GET /v1.0/me/directories/memberships.

Query parameters

  • fieldsstringoptional

    Comma-separated list of the fields to return. Leave it out and you get every field — including fields added in the future, which is your call to make: name your fields if you want to be shielded from that.

    Only first-level fields can be named. A nested list such as attendees, tags or sectionItems is returned whole or not at all; attendees.name is not supported.

    On a paged response the selection applies to the entries in items; page, pageSize, total and hasMore are always returned. An unknown name is rejected with 400 rather than ignored.

    Selectable here: enterprise, hasIndividualContract, pro, starter.

    Example: enterprise,hasIndividualContract

Response

  • hasIndividualContractbooleanrequired

    Whether the directory has an individual contract with Sally.

  • starteranyrequired

    Starter licenses.

  • proanyrequired

    Pro licenses.

  • enterpriseanyrequired

    Enterprise licenses.

Status codes

  • 200Success
  • 400

    Invalid request (validation error).

  • 401

    Missing or invalid bearer token.

  • 403

    ADMIN_ONLY_LICENSE_STATISTICS: only owners and administrators.

  • 404

    Resource not found or not accessible.

  • 429

    Rate limit exceeded (per token/IP). Transcription uploads may also return code FUP_LIMIT_EXCEEDED or TOO_MANY_CONCURRENT_TRANSCRIPTIONS.

  • 500

    Internal server error.

Try it

Send this request for real, with your own token and your own data.

Request
curl "https://api.sally.io/v1.0/directories/$DIRECTORY_ID/license-statistics" \
-H "Authorization: Bearer $SALLY_TOKEN"
Response example 200 OK
{
"hasIndividualContract": true,
"starter": null,
"pro": null,
"enterprise": null
}

Lists the subscriptions of the directory​

GET/v1.0/directories/{directoryId}/subscriptionsTry it →

Every subscription of the directory that is not deleted, newest first, each with its subscriptionId, billing interval, licenses per tier, end of the current period and a scheduled change. Only owners and administrators. A directory managed by a reseller partner answers 409 MANAGED_BY_RESELLER_PARTNER: its partner books the licenses.

Path parameters

  • directoryIdstringrequired

    Id of the directory (the Sally company account) the resource belongs to. The directories a token can address are listed by GET /v1.0/me/directories/memberships.

Query parameters

  • fieldsstringoptional

    Comma-separated list of the fields to return. Leave it out and you get every field — including fields added in the future, which is your call to make: name your fields if you want to be shielded from that.

    Only first-level fields can be named. A nested list such as attendees, tags or sectionItems is returned whole or not at all; attendees.name is not supported.

    On a paged response the selection applies to the entries in items; page, pageSize, total and hasMore are always returned. An unknown name is rejected with 400 rather than ignored.

    Selectable here: billingInterval, currentPeriodEnd, enterpriseLicensesCount, isCanceled, proLicensesCount, scheduledChange, starterLicensesCount, status, subscriptionId, trialEndsOn.

    Example: billingInterval,currentPeriodEnd

Response

  • itemsobject[]required

    All subscriptions of the directory that are not deleted, newest first.

    10 child fields
    • subscriptionIdstringrequired

      Id of the subscription.

    • billingIntervalstringrequired

      Billing interval.

      Allowed values: monthlyyearly
    • statusstringrequired

      trialing during the trial, canceled once it is canceled (it still runs until currentPeriodEnd), otherwise active.

      Allowed values: activetrialingcanceled
    • starterLicensesCountnumberrequired

      Starter licenses booked.

    • proLicensesCountnumberrequired

      Pro licenses booked.

    • enterpriseLicensesCountnumberrequired

      Enterprise licenses booked.

    • currentPeriodEndstringrequired

      End of the current period (ISO-8601, UTC).

    • trialEndsOnstringrequirednullable

      End of the trial (ISO-8601, UTC), null without a trial.

    • isCanceledbooleanrequired

      Whether the subscription is canceled at the end of the current period.

    • scheduledChangeanyrequirednullable

      A change scheduled for the end of the current period, or null: a reduction, or a member moving down to a lower tier (that tier is then higher here than today). A new lower target replaces it; the current number or a higher one removes it.

Status codes

  • 200Success
  • 400

    Invalid request (validation error).

  • 401

    Missing or invalid bearer token.

  • 403

    OWNER_OR_ADMIN_ONLY_SUBSCRIPTION: only owners and administrators.

  • 404

    Resource not found or not accessible.

  • 409

    MANAGED_BY_RESELLER_PARTNER: a reseller partner manages this directory and books its licenses.

  • 429

    Rate limit exceeded (per token/IP). Transcription uploads may also return code FUP_LIMIT_EXCEEDED or TOO_MANY_CONCURRENT_TRANSCRIPTIONS.

  • 500

    Internal server error.

Try it

Send this request for real, with your own token and your own data.

Request
curl "https://api.sally.io/v1.0/directories/$DIRECTORY_ID/subscriptions" \
-H "Authorization: Bearer $SALLY_TOKEN"
Response example 200 OK
{
"items": [
{
"subscriptionId": "77e63339-474b-468f-a6b0-99e59513cd75",
"billingInterval": "monthly",
"status": "active",
"starterLicensesCount": 3,
"proLicensesCount": 3,
"enterpriseLicensesCount": 3,
"currentPeriodEnd": "string",
"trialEndsOn": "2026-09-24T09:30:00Z",
"isCanceled": true,
"scheduledChange": null
}
]
}

Starts a new subscription (returns the checkout link)​

POST/v1.0/directories/{directoryId}/subscriptionsTry it →

The same way as „Choose plan" on the Billing page in Sally. Sally never takes payment details through the API: the response carries a checkoutUrl, a person opens it, chooses the number of licenses (1 to 999) and pays. There is no trial; billing starts at once. After the purchase Sally creates the subscription, and GET …/subscriptions lists it within seconds. Only owners and administrators.

There can only be one running subscription. Every starting point has exactly one answer:

  • No subscription, also after an earlier one ended: 201 with checkoutUrl.
  • A running subscription (active, trial, overdue, paused, or canceled until the end of the period): 409 SUBSCRIPTION_ALREADY_ACTIVE with its subscriptionId. Change it with PATCH …/subscriptions/{subscriptionId}.
  • A checkout completed in the last 24 hours whose subscription is still being set up: 409 SUBSCRIPTION_ALREADY_ACTIVE with subscriptionId: null. Load GET …/subscriptions again in a few seconds.
  • An individual contract: 409 CUSTOM_CONTRACT_ACTIVE.
  • Managed by a reseller partner: 409 MANAGED_BY_RESELLER_PARTNER.
  • A tier without a price in this interval, for example „None": 400 LICENSE_NOT_BOOKABLE.
  • A currencyCode other than the one the directory has been billed in: 409 CURRENCY_MISMATCH.
  • Neither owner nor administrator: 403 OWNER_OR_ADMIN_ONLY_SUBSCRIPTION.

Path parameters

  • directoryIdstringrequired

    Id of the directory (the Sally company account) the resource belongs to. The directories a token can address are listed by GET /v1.0/me/directories/memberships.

Query parameters

  • fieldsstringoptional

    Comma-separated list of the fields to return. Leave it out and you get every field — including fields added in the future, which is your call to make: name your fields if you want to be shielded from that.

    Only first-level fields can be named. A nested list such as attendees, tags or sectionItems is returned whole or not at all; attendees.name is not supported.

    On a paged response the selection applies to the entries in items; page, pageSize, total and hasMore are always returned. An unknown name is rejected with 400 rather than ignored.

    Selectable here: checkoutUrl, status.

    Example: checkoutUrl,status

Request body application/json

  • licenseIdstringrequired

    License tier to book; resolve valid ids via GET /v1.0/licenses. Only Starter, Pro and Enterprise can be booked.

  • billingIntervalstringrequired

    Billing interval.

    Allowed values: monthlyyearly
    Example: yearly
  • currencyCodestringoptional

    Currency of the subscription. Leave it out to use the currency the directory has been billed in before, otherwise EUR.

    Allowed values: EURUSD

Response

  • statusstringrequired

    Always checkout_required.

    Allowed values: checkout_required
  • checkoutUrlstringrequired

    Link to the Stripe checkout. A person opens it, chooses the number of licenses and pays; Sally then creates the subscription and lists it in GET …/subscriptions within seconds. Every opening starts a new checkout until a purchase is completed.

Status codes

  • 201Success
  • 400

    LICENSE_NOT_BOOKABLE or VALIDATION_FAILED.

  • 401

    Missing or invalid bearer token.

  • 403

    OWNER_OR_ADMIN_ONLY_SUBSCRIPTION.

  • 404

    Resource not found or not accessible.

  • 409

    SUBSCRIPTION_ALREADY_ACTIVE (with subscriptionId), CUSTOM_CONTRACT_ACTIVE, MANAGED_BY_RESELLER_PARTNER or CURRENCY_MISMATCH.

  • 429

    Rate limit exceeded (per token/IP). Transcription uploads may also return code FUP_LIMIT_EXCEEDED or TOO_MANY_CONCURRENT_TRANSCRIPTIONS.

  • 500

    Internal server error.

Try it

Send this request for real, with your own token and your own data.

Request
curl -X POST "https://api.sally.io/v1.0/directories/$DIRECTORY_ID/subscriptions" \
-H "Authorization: Bearer $SALLY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"licenseId": "f5f084e9-b993-425f-ad36-bfd5dc3f0e65",
"billingInterval": "yearly"
}'
Response example 201 Created
{
"status": "checkout_required",
"checkoutUrl": "https://example.com/hooks/sally"
}

Changes the licenses of a subscription​

PATCH/v1.0/directories/{directoryId}/subscriptions/{subscriptionId}Try it →

The same booking and the same limits as „Adjust licenses" on the Billing page in Sally. Send only the tiers that change. Only owners and administrators.

  • Increasing takes effect at once and is charged pro rata right away; send acceptTerms: true. If the bank wants to confirm the payment, the answer is 202 with a confirmationUrl: an owner or administrator confirms it on the Billing page in Sally, and until then nothing is booked. The change expires after about 23 hours. With SEPA direct debit the increase applies at once and the invoice stays open.
  • Reducing is scheduled for the end of the current period, without a credit, and shows up in scheduledChange. During the trial it applies at once. A new lower target replaces the scheduled one, the current number or a higher one removes it.
  • Never below the licenses assigned through the subscription (409 BELOW_ASSIGNED_LICENSES with the tier and the minimum), unless the same request adds free seats in other tiers for every member who would lose theirs. Assigned licenses fill an individual contract first; otherwise take licenses away from members first with PATCH …/memberships/{userId}.
  • Switching tiers in one request: taking seats away from a tier and adding seats to a higher tier takes effect at once. Stripe credits the unused time of the lower tier against the higher one, so only the difference is charged, and members who held the lower tier move up. Moving a member down to a lower tier takes effect at the end of the current period: the member keeps the higher tier until then, there is no credit, and scheduledChange shows both tiers.
  • At most 2000 licenses per tier. The billing interval is changed in Sally only.
  • Only the running subscription can be changed: an unknown id answers 404, an earlier or ended one 409 SUBSCRIPTION_NOT_ACTIVE.

Path parameters

  • directoryIdstringrequired

    Id of the directory (the Sally company account) the resource belongs to. The directories a token can address are listed by GET /v1.0/me/directories/memberships.

  • subscriptionIdstringrequired

    Id of the subscription, from GET …/subscriptions.

Query parameters

  • fieldsstringoptional

    Comma-separated list of the fields to return. Leave it out and you get every field — including fields added in the future, which is your call to make: name your fields if you want to be shielded from that.

    Only first-level fields can be named. A nested list such as attendees, tags or sectionItems is returned whole or not at all; attendees.name is not supported.

    On a paged response the selection applies to the entries in items; page, pageSize, total and hasMore are always returned. An unknown name is rejected with 400 rather than ignored.

    Selectable here: billingInterval, currentPeriodEnd, enterpriseLicensesCount, isCanceled, proLicensesCount, scheduledChange, starterLicensesCount, status, subscriptionId, trialEndsOn.

    Example: billingInterval,currentPeriodEnd

Request body application/json

  • starterLicensesCountnumberoptional

    Target number of Starter licenses. Leave it out to keep the current number.

  • proLicensesCountnumberoptional

    Target number of Pro licenses. Leave it out to keep the current number.

  • enterpriseLicensesCountnumberoptional

    Target number of Enterprise licenses. Leave it out to keep the current number.

  • acceptTermsbooleanoptional

    Required as true for every increase: an increase is charged right away, and you accept the terms of use and the privacy policy with it, as on the Billing page in Sally.

Response

  • subscriptionIdstringrequired

    Id of the subscription.

  • billingIntervalstringrequired

    Billing interval.

    Allowed values: monthlyyearly
  • statusstringrequired

    trialing during the trial, canceled once it is canceled (it still runs until currentPeriodEnd), otherwise active.

    Allowed values: activetrialingcanceled
  • starterLicensesCountnumberrequired

    Starter licenses booked.

  • proLicensesCountnumberrequired

    Pro licenses booked.

  • enterpriseLicensesCountnumberrequired

    Enterprise licenses booked.

  • currentPeriodEndstringrequired

    End of the current period (ISO-8601, UTC).

  • trialEndsOnstringrequirednullable

    End of the trial (ISO-8601, UTC), null without a trial.

  • isCanceledbooleanrequired

    Whether the subscription is canceled at the end of the current period.

  • scheduledChangeanyrequirednullable

    A change scheduled for the end of the current period, or null: a reduction, or a member moving down to a lower tier (that tier is then higher here than today). A new lower target replaces it; the current number or a higher one removes it.

Status codes

  • 200The change is booked.
  • 400

    TERMS_NOT_ACCEPTED or VALIDATION_FAILED.

  • 401

    Missing or invalid bearer token.

  • 402

    LICENSE_PAYMENT_DECLINED: nothing was booked.

  • 403

    OWNER_OR_ADMIN_ONLY_SUBSCRIPTION.

  • 404

    SUBSCRIPTION_NOT_FOUND.

  • 409

    BELOW_ASSIGNED_LICENSES, SUBSCRIPTION_NOT_ACTIVE, MANAGED_BY_RESELLER_PARTNER or LICENSE_CHANGE_PENDING_CONFIRMATION (with confirmationUrl: an earlier change still waits for the bank).

  • 429

    Rate limit exceeded (per token/IP). Transcription uploads may also return code FUP_LIMIT_EXCEEDED or TOO_MANY_CONCURRENT_TRANSCRIPTIONS.

  • 500

    Internal server error.

Try it

Send this request for real, with your own token and your own data.

Request
curl -X PATCH "https://api.sally.io/v1.0/directories/$DIRECTORY_ID/subscriptions/$SUBSCRIPTION_ID" \
-H "Authorization: Bearer $SALLY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"starterLicensesCount": 3,
"proLicensesCount": 3,
"enterpriseLicensesCount": 3,
"acceptTerms": true
}'
Response example 200 OK
{
"subscriptionId": "77e63339-474b-468f-a6b0-99e59513cd75",
"billingInterval": "monthly",
"status": "active",
"starterLicensesCount": 3,
"proLicensesCount": 3,
"enterpriseLicensesCount": 3,
"currentPeriodEnd": "string",
"trialEndsOn": "2026-09-24T09:30:00Z",
"isCanceled": true,
"scheduledChange": null
}