API Reference

membership-entitlements

2 endpoints

  • /api/v1/organizations
GET/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/entitlements

Get Membership Entitlements

Read a user's active tier and entitlements in an organization.

For third-party gating: an org's backend checks whether one of its users holds a membership/tier/entitlement. A user with no membership returns has_membership=false with empty entitlements.

Path parameters

user_uuid*string
organization_slug*string

Query parameters

default_backendstring

default: "primary"

Responses

200Successful Response
FieldTypeDescription
user_uuid*string
organization_uuid*string
has_membership*boolean
tier_uuidstring | null
tier_slugstring | null
entitlementsobject
401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

404Resource not found
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

Example request

curl -X GET "https://api.davi.social/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/entitlements" \
  -H "Authorization: Bearer <token>"
GET/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/entitlements/{key}

Check Membership Entitlement

Focused check: does the membership's tier grant entitlement key.

Path parameters

user_uuid*string
key*string
organization_slug*string

Query parameters

default_backendstring

default: "primary"

Responses

200Successful Response
FieldTypeDescription
user_uuid*string
organization_uuid*string
key*string
granted*boolean
401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

404Resource not found
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

Example request

curl -X GET "https://api.davi.social/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/entitlements/{key}" \
  -H "Authorization: Bearer <token>"