Gift Assets to Users
Gift digital assets (images and videos) to registered users via the Distinct API.
Endpoint
POST https://api.distinct.so/api/v1/vendor/user/assets
Request Headers
| Key | Value |
|---|---|
Content-Type | multipart/form-data |
x-distinct-api-key | Your shared API key |
Request Body
| Key | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | Unique identifier of the user who will receive the gifted assets. The user receives this ID as a QR Code via Email/SMS upon registration. |
eventId | String | Yes | Unique Event ID mapped to a Distinct Event. Only users registered for this event are eligible to receive assets. |
assets | File[] | Yes | Images or videos to be gifted to the user. |
Response
Success (200)
{
"statusCode": 200,
"message": "Assets uploaded successfully.",
"data": null
}
Example Request
cURL
curl -L -X POST 'https://api.distinct.so/api/v1/vendor/user/assets' \
-H 'x-distinct-api-key: <shared-api-key>' \
-F 'userId="<register-user-id>"' \
-F 'eventId="<event-id>"' \
-F 'assets=@"/path/to/your/image1.jpg"' \
-F 'assets=@"/path/to/your/image2.jpg"'
Replace the placeholders:
<shared-api-key>— your actual shared API key<register-user-id>— the registered User ID<event-id>— your shared Event ID/path/to/your/image1.jpg— actual file paths to the assets
Limits
- Up to 10 assets can be uploaded in a single request.
- Each file must not exceed 50 MB (configurable based on requirements).
Notes
info
All three request body fields (userId, eventId, assets) are required and must be sent as multipart/form-data.
- The
x-distinct-api-keywill be shared with you by the Distinct team and must be included in every API request. - You can generate the
eventIdon your end and share it with us in advance so we can map it to a Distinct event. Alternatively, we can create it from our side and share it with you. - Up to 10 assets can be uploaded per request, with a max file size of 50 MB each (configurable).
Workflow Summary
graph TD
A[Create or receive Event ID] --> B[User registers and receives User ID via QR Code]
B --> C[Call Gift Assets API with Event ID, User ID, and assets]
C --> D[Assets are gifted to the user on Distinct]
- [Before Integration] Create an Event ID — Generate one on your end and share it with us, or we can create it and share it with you.
- User Registration — Upon registration, the user receives an ID as a QR Code via Email/SMS.
- Call the API — Send the Event ID, User ID, and asset files (images/videos) to gift the assets to the user.