---
title: "POST /v2/domains/{domainIdentifier}/subscription-grants"
method: POST
path: "/v2/domains/{domainIdentifier}/subscription-grants"
---

# POST /v2/domains/{domainIdentifier}/subscription-grants

`POST /v2/domains/{domainIdentifier}/subscription-grants`

Creates a subsscription grant in Amazon DataZone.

## Path parameters

- `domainIdentifier` string, required

## Request body

- object
  - `environmentIdentifier` string, required — The ID of the environment in which the subscription grant is created.
  - `subscriptionTargetIdentifier` string — The ID of the subscription target for which the subscription grant is created.
  - `grantedEntity` object, required — The details of a listing for which a subscription is to be granted.
    - `listing` object — The listing for which a subscription is to be granted.
      - `identifier` string, required — An identifier of revision to be made to an asset published in a Amazon DataZone catalog.
      - `revision` string, required — The details of a revision to be made to an asset published in a Amazon DataZone catalog.
  - `assetTargetNames` AssetTargetNameMap[] — The names of the assets for which the subscription grant is created.
    - `assetId` string, required — The identifier of the inventory asset.
    - `targetName` string, required — The target name in the asset target name map.
  - `clientToken` string — A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

## Response `200`

Success

- CreateSubscriptionGrantOutput
  - `id` string, required — The ID of the subscription grant.
  - `createdBy` string, required — The Amazon DataZone user who created the subscription grant.
  - `updatedBy` string — The Amazon DataZone user who updated the subscription grant.
  - `domainId` string, required — The ID of the Amazon DataZone domain in which the subscription grant is created.
  - `createdAt` string, date-time, required — A timestamp of when the subscription grant is created.
  - `updatedAt` string, date-time, required — A timestamp of when the subscription grant was updated.
  - `environmentId` string — The environment ID for which subscription grant is created.
  - `subscriptionTargetId` string, required — The ID of the subscription target for which the subscription grant is created.
  - `grantedEntity` object, required — The entity to which the subscription is granted.
    - `listing` object — The listing for which a subscription is granted.
      - `id` string, required — An identifier of a revision of an asset published in a Amazon DataZone catalog.
      - `revision` string, required — The details of a revision of an asset published in a Amazon DataZone catalog.
  - `status` 'PENDING' | 'IN_PROGRESS' | 'GRANT_FAILED' | 'REVOKE_FAILED' | 'GRANT_AND_REVOKE_FAILED' | 'COMPLETED' | 'INACCESSIBLE', required — The status of the subscription grant.
  - `assets` SubscribedAsset[] — The assets for which the subscription grant is created.
    - `assetId` string, required — The identifier of the asset for which the subscription grant is created.
    - `assetRevision` string, required — The revision of the asset for which the subscription grant is created.
    - `status` 'GRANT_PENDING' | 'REVOKE_PENDING' | 'GRANT_IN_PROGRESS' | 'REVOKE_IN_PROGRESS' | 'GRANTED' | 'REVOKED' | 'GRANT_FAILED' | 'REVOKE_FAILED', required — The status of the asset for which the subscription grant is created.
    - `targetName` string — The target name of the asset for which the subscription grant is created.
    - `failureCause` object — The failure cause included in the details of the asset for which the subscription grant is created.
      - `message` string — The description of the error message.
    - `grantedTimestamp` string, date-time — The timestamp of when the subscription grant to the asset is created.
    - `failureTimestamp` string, date-time — The failure timestamp included in the details of the asset for which the subscription grant is created.
    - `assetScope` object — The asset scope of the subscribed asset.
      - `assetId` string, required — The asset ID of the asset scope.
      - `filterIds` FilterId[], required — The filter IDs of the asset scope.
      - `status` string, required — The status of the asset scope.
      - `errorMessage` string — The error message of the asset scope.
    - `permissions` object — The asset permissions.
      - `s3` S3Permission[] — The S3 details of the asset permissions.
  - `subscriptionId` string — The identifier of the subscription grant.Multiple subscriptions can exist for a single grant

## Other responses

- `480` — InternalServerException
- `481` — ResourceNotFoundException
- `482` — AccessDeniedException
- `483` — ThrottlingException
- `484` — ConflictException
- `485` — ValidationException
- `486` — UnauthorizedException

---

[API](https://skmtc.net/aws/apis/datazone.md) · [All operations](https://skmtc.net/aws/apis/datazone/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/datazone/versions/055599054b53/schema)
