Skip to content
EntitlerDocs

POST/v1/customers/{external_id}/billing/portal-sessions

Create portal session

Needs customers:write or billing:self; a customer token or identity caller also needs the team plan's customer portal and is limited to one call every 10 seconds per customer.

curl -X POST 'https://api.entitler.co/v1/customers/ada/billing/portal-sessions' \
  -H "Authorization: Bearer $ENTITLER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"returnUrl":"returnUrl","target":{"environmentId":"environmentId","projectId":"projectId","teamId":"teamId"}}'

Credentials

Send any one of these:

  • Bearer token

Path parameters

NameTypeDescription
external_idrequiredstringThe customer's external ID, or me for the customer a customer token or identity token names.

Request body

object

  • returnUrlstring
  • targetProductTarget
    • environmentIdstring
    • projectIdstring
    • teamIdstring

Responses

200The CreatePortalSessionResponse message.

CreatePortalSessionResponse

  • urlstringrequired

ErrorA refusal, with the HTTP status of its gRPC code.

Error

  • errorobjectrequired
    • codestringrequired
    • parametersobjectrequired

      Each value: string

    • reasonstringor nullrequired