Streav
Streav

GET /v1/subscribers

Retrieves a paginated list of subscribers.

Parameters
NameLocated inDescriptionRequiredType
UsernamequeryOptional. Filter subscribers by username.Nostring
EmailqueryOptional. Filter subscribers by email address.Nostring
AccessTokenqueryOptional. Filter subscribers by access token.Nostring
StatusIdqueryOptional. Filter subscribers by status.Nointeger
ExpiredqueryOptional. Filter subscribers by expiration status. Set to true to only include subscribers whose subscriptions have expired.Noboolean
SortByqueryOptional. Specifies the sort order of the subscribers. Supports sorting by 'username', 'username_desc', 'expiresAt', and 'expiresAt_desc'. Defaults to ascending order by subscriber ID if not specified.Nostring
PagequeryPage number to retrieve. Default is 1.Nointeger
PageSizequeryNumber of records per page. Default is 25.Nointeger
Responses
CodeDescription
200Success

POST /v1/subscribers

Creates a new subscriber with the specified details.

Body
{
  "username": "string",
  "email": "string",
  "expiresAt": "2024-03-20T16:28:54.442Z",
  "maxConnections": 0,
  "isTrial": true,
  "note": "string",
  "hls": true,
  "mpegTs": true,
  "bundles": [
    0
  ],
  "ipAddresses": [
    "string"
  ],
  "userAgents": [
    "string"
  ],
  "countries": [
    "string"
  ]
}
Responses
CodeDescription
200Success
422Validation error if the input parameters are incorrect.

GET /v1/subscribers/{id}

Retrieves a subscriber by ID.

Parameters
NameLocated inDescriptionRequiredType
idpathThe ID of the subscriber to retrieve.Yesinteger
includequeryThe related data to include. Possible values are bundles, ipAddresses, userAgents, and countries.No string
Responses
CodeDescription
200Success
422Validation error if the input parameters are incorrect.

PUT /v1/subscribers/{id}

Updates an existing subscriber with the specified details.

Parameters
NameLocated inDescriptionRequiredType
idpathThe ID of the subscriber to update.Yesinteger
Body
{
  "username": "string",
  "email": "string",
  "expiresAt": "2024-03-22T15:01:50.107Z",
  "maxConnections": 0,
  "isTrial": true,
  "note": "string",
  "hls": true,
  "mpegTs": true,
  "bundles": [
    0
  ],
  "ipAddresses": [
    "string"
  ],
  "userAgents": [
    "string"
  ],
  "countries": [
    "string"
  ]
}
Responses
CodeDescription
200If the subscriber was successfully updated.
422Validation error if the input parameters are incorrect.

DELETE /v1/subscribers/{id}

Deletes an existing subscriber.

Parameters
NameLocated inDescriptionRequiredType
idpathThe ID of the subscriber to delete.Yesinteger
Responses
CodeDescription
200If the subscriber was successfully deleted.
422Validation error if the input parameters are incorrect.

GET /v1/subscribers/{accessToken}

Retrieves a subscriber by access token.

Parameters
NameLocated inDescriptionRequiredType
accessTokenpathThe access token of the subscriber to retrieve.Yesstring
includequeryThe related data to include. Possible values are bundles, ipAddresses, userAgents, and countries.No string
Responses
CodeDescription
200Success
422Validation error if the input parameters are incorrect.

POST /v1/subscribers/{id}/regenerate-token

Regenerates the access token for a specific subscriber, revoking any current access.

Parameters
NameLocated inDescriptionRequiredType
idpathThe ID of the subscriber whose access token is to be regenerated.Yesinteger
Body
{
  "id": 0,
  "accessToken": "string",
  "username": "string",
  "email": "string",
  "expiresAt": "2024-03-20T16:34:46.618Z",
  "maxConnections": 0,
  "isTrial": true,
  "note": "string",
  "status": 0,
  "hls": true,
  "mpegTs": true
}
Responses
CodeDescription
200Success

GET /v1/subscribers/statues

Retrieves a list of subscriber statues.

Responses
CodeDescription
200Success