---
title: "Create Grant"
method: POST
path: "/v2/entitlements/{id}/grants"
tags: ["Entitlements V2"]
---

# Create Grant

`POST /v2/entitlements/{id}/grants`

Grants an entitlement to a user/device. Requires entitlements:write scope.

## Path parameters

- `id` string, required — Entitlement ID

## Request body

- object
  - `user_id` string — User ID to grant the entitlement to
  - `device_id` string, required — Device ID to grant the entitlement to
  - `expires_at` string — ISO 8601 timestamp of when the grant should expire. Omit for permanent grants
  - `reason` string — Reason for granting the entitlement

## Response `200`

Success

- object
  - `id` string, required — Unique identifier for the grant
  - `object` 'entitlement_grant', required — Object type, always `entitlement_grant`
  - `entitlement` string, required — ID of the entitlement being granted
  - `entitlement_identifier` string, required — Identifier string of the entitlement being granted
  - `user_id` string, nullable, required — User ID the grant applies to, or null
  - `device_id` string, required — Device ID the grant applies to
  - `expires_at` string, nullable, required — ISO 8601 timestamp of when the grant expires, or null for permanent grants
  - `reason` string, nullable, required — Reason for the grant, or null
  - `granted_by` string, required — Identifier of who granted this entitlement
  - `granted_at` string, required — ISO 8601 timestamp of when the grant was created
  - `status` union, required — Current status of the grant
    - 'active' — Grant is currently active
    - 'expired' — Grant has expired
    - 'revoked' — Grant has been revoked

## Other responses

- `400` — The request did not match the expected schema
- `401` — No API key was provided in the request
- `403` — The API key does not have permission to perform this action
- `404` — The requested resource was not found
- `409` — The resource already exists or conflicts with an existing resource
- `429` — Too many requests have been made in a short period
- `500` — An unexpected error occurred on the server

---

[API](https://skmtc.dev/superwall/apis/superwall-api-v2.md) · [All operations](https://skmtc.dev/superwall/apis/superwall-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superwall/superwall-api-v2/revisions/44900ad77d2c/schema)
