Skip to main content

Assign and unassign subscriptions

After you create a valid subscription, you can assign and unassign users to and from that subscription. To do so, you will need the unique subscription identifier returned in the create subscription response, and the unique user identifier for the user to assign or unassign returned in the create user response. You can also find the identifiers with the respective list API methods.

Create application assignments

Assign (add) the specified user to the specified subscription. See the API reference documentation for full details.

Below is an example of a successful user assignment request and response. Additional examples are provided in the example section of this document.  All of the examples assume that you successfully created a subscription as described in Create subscriptions.

Request

POST /api/account/v2/subscriptions/07db1f71-8e24-48ba-acd6-49210aee0692/assignments/f3acf89c-0803-47e8-8e12-30c4593c2904?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjY5NTY5ZjY4LTRlMzktNDE5NC05MGY2LTQ1ZDYzOTMyOTlmNyJ9.eyJzdWIiOiJhYXJvbi5iYXNkZW8rMjBAYXBwZGlyZWN0LmNvbSIsImF1ZCI6WyJvcGVuaWQiLCJkZXZlbG9wZXIiLCJhY2NvdW50IiwiYmlsbGluZyIsImF0dCIsIm8zNjUiLCJtYXJrZXRwbGFjZSIsImNoYW5uZWwiLCJob3N0ZWRjaGVja291dCIsInNlc3Npb24iLCJzdXBlcnVzZXIiLCJpbnRlZ3JhdGlvbiIsInJlcG9ydGluZyIsIm5vdGlmaWNhdGlvbiIsIlBSTSIsIm1hcmtldHBsYWNldjMiLCJhcHBSZXNlbGxlciIsInVuaXZlcnNhbG5hdmlnYXRvciIsImFwcE1hcmtldCIsInRlbHN0cmFWMyIsInByb2R1Y3RTZXR0aW5nIiwicHJvZHVjdFNldHRpbmdBY3RpdmVDb21wb25lbnQiLCJjaGVja291dFYzIiwibGVhZHN2MiJdLCJleHAiOjE1MzgxODgwNjksImp0aSI6IjgxM2ZkMDQ2LTA1Y2EtNDFmZC1hZGE3LTE4ODQ5OWVhMTU5YyIsImNsaWVudF9pZCI6IjVQMG9LNUdWZGsiLCJzY29wZSI6WyJST0xFX0NIQU5ORUxfU1VQUE9SVCIsIlJPTEVfREVWRUxPUEVSIiwib3BlbmlkIiwicHJvZmlsZSIsIlJPTEVfQ0hBTk5FTF9BRE1JTiIsIlJPTEVfQklMTElOR19BRE1JTiIsIlJPTEVfQ09SUE9SQVRFX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DSEFOTkVMX1BST0RVQ1RfU1VQUE9SVCIsImNvbXBhbnkiLCJST0xFX1NBTEVTX1NVUFBPUlQiLCJST0xFX1JFU0VMTEVSX01BTkFHRVIiLCJlbWFpbCIsIlJPTEVfU1lTX0FETUlOIl19.aSVP-2jgd5sx6QjHsnDTGM72o9h_tvHZasn7LDD13ZoK3IwlhBNQQIUxHsfe0yJXTsZ7I26iPc5tOHxjDyjWs49Pa2yv-QxGLiuEEd5wElZdfb6oXKJxxAL_UMIBQfqaRIj9jp3zfNjZ4rHnqPKO-AYsWAqEMW49ZXBBGbHdA_INgoeUqXKzWDLXCakUXQI7EZ147RZjJBnguQo8t7bT0fp1EpS6kD6TU4v3pZVjWlzDStMBWY9ZpB7Tz-6yGbeBSOZvrVTpqrqEZj92C47AFAMvewH_5F3O-IT2S-9dW8J40B_ANE_Z7D544bZPpHeclKACDsaqYyhyRMvCA3ODJQ HTTP/1.1
Host: www.example.com
Accept: application/json
Content-Type: application/json
Cache-Control: no-cache

Response

Status: 201 Created

Delete application assignments

Unassign (remove) the specified user from the subscription. See the API reference documentation for full details.

URL endpoint: /api/account/v1/companies/{companyId}/users/{userId}/unassign/{subscriptionId}

Below is an example of a successful user unassignment request and response. Additional examples are provided in the example section of this document.  All of the examples presented assume you successfully created a subscription as described in Create subscriptions.

Request

DELETE /api/account/v2/subscriptions/07db1f71-8e24-48ba-acd6-49210aee0692/assignments/4ef60b96-6180-4d82-8080-6f59ff51e2d3?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImYyMmNlOGFhLTc4MzktNDk1Yy04ZTU5LTg5ZTIxYjcyZmJlZiJ9.eyJzdWIiOiJhYXJvbi5iYXNkZW8rMjBAYXBwZGlyZWN0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Hub5ZHiq_9eKvrKgiMFVylO4mURMb01iFDddIs2_9NxN1x8jFavH4oyF4Ew6HGt8COA0AMRlpUass1NQVjpTd1RXBD8LmRiljfbstCajLaxRcSCr98FF0c0OH39Ae4-j_cs90ZdVAF6wHAJ4BQCzOtehg HTTP/1.1
Host: www.example.com
Cache-Control: no-cache

Response

Status Code: 204 No Content

Was this page helpful?