SkillhabitDocs

Content Targeting

Assign, list, and delete content visibility/assignment targets for users and groups (optional or mandatory, with optional date windows).

GET
/content/targets

Returns users and groups that can see a content item, including optional visibility windows and whether access is mandatory.

AuthorizationBearer <token>

A JSON Web Token

In: header

Query Parameters

contentId*string

Content id whose assignments should be listed.

Response Body

application/json

curl -X GET "https://example.com/content/targets?contentId=string"
{  "targets": [    {      "targetId": "string",      "targetType": "string",      "contentId": "string",      "contentType": "string",      "mandatory": true,      "name": "string",      "startTime": "string",      "finishTime": "string",      "scheduleTriggerIsActive": true,      "visibilityIsActive": true,      "triggeredStartTime": "string",      "triggeredFinishTime": "string",      "createdAt": "string",      "updatedAt": "string",      "updatedBy": "string"    }  ]}
POST
/content/targets

Assigns content to a user or group. Optional fields control whether access is mandatory and when visibility starts and ends.

AuthorizationBearer <token>

A JSON Web Token

In: header

Request Body

application/json

Assignment details for a user or group. At minimum provide contentId and either userId or targetId.

TypeScript Definitions

Use the request body type in TypeScript.

Request to assign a content item to a user or group and optionally attach purchase metadata.

Response Body

curl -X POST "https://example.com/content/targets" \  -H "Content-Type: application/json" \  -d '{}'
Empty
DELETE
/content/targets

Removes a user or group assignment from a content item, including visibility and mandatory access.

AuthorizationBearer <token>

A JSON Web Token

In: header

Request Body

application/json

Assignment to remove. targetId, targetType, and contentId are required.

TypeScript Definitions

Use the request body type in TypeScript.

Request to remove a content assignment from a user or group.

Response Body

curl -X DELETE "https://example.com/content/targets" \  -H "Content-Type: application/json" \  -d '{}'
Empty