Skip to content
EntitlerDocs

POST/v1/customers/{external_id}/snapshots

Create an entitlements snapshot

Returns a signed snapshot of the customer's entitlements that a client can verify offline against the published snapshot keys. It expires after the project's offline window. Needs entitlements:read.

curl -X POST 'https://api.entitler.co/v1/customers/ada/snapshots' \
  -H "Authorization: Bearer $ENTITLER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lifetimeSeconds":1,"memberId":"memberId","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

  • lifetimeSecondsinteger (int64)

    at least 0; at most 4294967295

  • memberIdstring
  • targetProductTarget
    • environmentIdstring
    • projectIdstring
    • teamIdstring

Responses

200The CreateSnapshotResponse message.

CreateSnapshotResponse

  • expiresAtintegerrequired

    at least 0; at most 18446744073709552000

  • keyIdstringrequired
  • tokenstringrequired

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

Error

  • errorobjectrequired
    • codestringrequired
    • parametersobjectrequired

      Each value: string

    • reasonstringor nullrequired