API For Share Code

List share code

get

Returns a list of share codes

Authorizations
api-keystringRequired
Query parameters
statusintegerOptional

Filter share codes by status.

limitintegerOptional

Maximum number of items returned. Default: 30.

pageintegerOptional

Page number of the requested data. Default: 1.

sort_bystringOptional

Field used for sorting: code, amount_ips, created_at. Default: created_at.

order_bystringOptional

Sort order: desc or asc. Default: desc.

keywordstringOptional

Search by keyword in the code field.

emailstringOptional

Filter codes forwarded to a specific email. Example: [email protected]

data_typeintegerOptional

Filter by data type, 1: ip, 2: traffic. Ex: 1

is_enterpriseintegerOptional

Filter enterprise codes: 0 = false, 1 = true. Example: 1

Responses
chevron-right
200

Successful response

application/json

Returns the list of share codes for the user.

successbooleanOptional

Indicates whether the request was successful.

messagestringOptional

Response message.

get
/client/v1/cd-keys/list-share-code

List use code

get

Returns a list of used share codes.

Authorizations
api-keystringRequired
Query parameters
statusintegerOptional

Filter by code status.

limitintegerOptional

Maximum number of items returned. Default: 30.

pageintegerOptional

Page number of the requested data. Default: 1.

sort_bystringOptional

Field used for sorting: code, amount_ips, used_at. Default: used_at.

order_bystringOptional

Sort order: desc or asc. Default: desc.

keywordstringOptional

Search by keyword in the code field.

emailstringOptional

Filter codes received from a specific email. Example: [email protected]

data_typeintegerOptional

Filter by data type, 1: ip, 2: traffic. Ex: 1

is_enterpriseintegerOptional

Filter by enterprise: 0: false, 1: true. Ex: 1

Responses
chevron-right
200

Successful response

application/json

Returns the list of redeemed share codes for the user.

successbooleanOptional

Indicates whether the request was successful.

messagestringOptional

Response message.

get
/client/v1/cd-keys/list-use-code

Generate Ip share code

post

Generate IP share codes.

Authorizations
api-keystringRequired
Body
planintegerRequired

Data plan type for sharing. 1 = IP plan.

Example: 1
number_of_ipsintegerRequired

Number of IPs to share.

Example: 10
number_of_codesintegerRequired

Number of share codes to generate.

Example: 5
forward_tostringOptional

Email address of the recipient.

Example: [email protected]
Responses
chevron-right
200

Successful response

application/json

Returns newly generated share codes.

successbooleanOptional

Indicates whether the request was successful.

messagestringOptional

Response message.

post
/client/v1/cd-keys/generate-ip-code

Generate Traffic share code

post

Generate traffic share codes.

Authorizations
api-keystringRequired
Body
traffic_planintegerRequired

ID of the traffic plan used for sharing.

Example: 1
amount_trafficintegerOptional

Amount of traffic to share in bytes. Minimum: 1000000000 (1 GB).

Example: 1000000000
number_of_codesintegerRequired

Number of share codes to generate.

Example: 5
forward_tostringOptional

Email address of the recipient.

Example: [email protected]
Responses
chevron-right
200

Successful response

application/json

Returns newly generated share codes.

successbooleanOptional

Indicates whether the request was successful.

messagestringOptional

Response message.

post
/client/v1/cd-keys/generate-traffic-code

Use code

post

Request to apply share codes.

Authorizations
api-keystringRequired
Body
codesstring[]Required

Array of share codes to apply.

Example: ["code_1","code_2","code_3"]
Responses
chevron-right
200

Successful response

application/json

Returns the share codes that were successfully applied.

successbooleanOptional

Indicates whether the request was successful.

messagestringOptional

Response message.

post
/client/v1/cd-keys/use-code

Revoke share code

delete

Request to revoke share codes.

Authorizations
api-keystringRequired
Body
codesstring[]Required

Array of share codes to revoke.

Example: ["code_1","code_2","code_3"]
Responses
chevron-right
200

Successful response

application/json
successbooleanOptional

Indicates whether the request was successful.

messagestringOptional

Response message.

resultobjectOptional
delete
/client/v1/cd-keys/revoke-code

Last updated

Was this helpful?