API Reference
Create Bot
Endpoint
POST /v1/bots
Description
This endpoint allows you to create a new bot in the system. It requires specific parameters in the request body and query string, and upon successful creation, it will return the details of the newly created bot.
Authentication
This endpoint requires bearer token authentication.
Users must be authorized with the appropriate permissions to create a bot.
Request
Headers
Query Parameters
appId
(string, required): The ID of the application to which the bot will be associated.
Request Body
The request body must be a JSON object that conforms to the BotCreateDTO
structure:
Response
Success Response
On successful creation, the response will return a BotCreateResDTO
structure that contains the bot's details:
Error Responses
400 Bad Request: If the request is malformed or required parameters are missing.
401 Unauthorized: If the user is not authenticated or does not have the necessary permissions.
Example Usage
Here is an example of how to call the endpoint using curl
:
Notes
Ensure that the
username
is unique and meets any constraints specified by your application.The
appAuthSecret
is sensitive and should be treated securely.Review the expected field types in the request body to ensure proper validation.
List Bot
Endpoint
GET /v1/bots
Description
This endpoint retrieves a paginated list of bots in the system based on specified query parameters. It provides information about each bot, including its status, username, email, and other relevant details.
Authentication
This endpoint requires bearer token authentication. Users must be authorized with the appropriate permissions to access the bot list.
Request
Headers
Query Parameters
appId
string
Yes
The ID of the application to which the bots belong.
limit
number
No
The number of results to return per page. Default is 10
.
offset
number
No
The number of items to skip before starting to collect the result set. Default is 0
.
botState
string
No
The state of the bots to filter by (e.g., ACTIVE).
search
string
No
A search term to filter bots by their username, email, etc.
isDeleted
string
No
To filter bots based on their deletion status (e.g., true
or false
).
Example Request
Response
Success Response
On a successful request, the response will return a BotPagingResDTO
structure containing a paginated list of bots:
Error Responses
400 Bad Request: If the request is malformed or required parameters are missing.
401 Unauthorized: If the user is not authenticated or does not have the necessary permissions.
Example Usage
Here is an example of how to call the endpoint using curl:
Notes
Adjust the
limit
andoffset
parameters to paginate through results.The
botState
parameter can be used to filter results based on the bot's current status.Ensure that the
appId
corresponds to a valid application in your system.
Explanation of Main Fields
data: This is the main object containing the response details related to the bots.
total:
Type: Integer
Description: The total number of bot records available that match the query. In this case, it indicates there are 9 bots in total.
data:
Type: Array of Bot Objects
Description: An array of bot records that match the filtering criteria. Each object contains detailed information about an individual bot.
active:
Type: Integer
Description: The number of bots that are currently in an "ACTIVE" state. This indicates that there are 9 active bots in the current context.
isProfileUpdating:
Type: Array
Description: An empty array in this context. It might be intended to hold information about bots whose profiles are currently being updated, if applicable.
path:
Type: String
Description: The API endpoint path that was accessed, including the query parameters used in the request.
method:
Type: String
Description: The HTTP method used for the request (GET in this case).
message:
Type: String
Description: A brief description of the result of the API call (e.g., "success" indicates that the request was processed successfully).
statusCode:
Type: Integer
Description: The HTTP status code returned by the server. A value of 200 indicates that the request was successful.
Breakdown of Each Bot Object in the Data Array
Now, let's delve deeper into the fields of each bot object within the data
array:
Field Descriptions
status
string
The current status of the bot. It indicates whether the bot is active, locked, or in another state.
errorMessage
string (or null)
An error message associated with the bot, providing insights into issues that may affect its operation. For instance, "EXPIRE_SESSION"
suggests session expiration.
createdBy
string
Indicates who created the bot (e.g., "USER"
means it was created by a user, as opposed to the system).
follower
integer (or null)
The number of followers the bot has. It can be null if this information is not available.
following
integer (or null)
The number of accounts the bot is following. It can be null if this information is not available.
username
string
The unique username of the bot used in interactions.
string (or null)
The email address associated with the bot, which can be used for notifications or recovery.
phone
string
The phone number associated with the bot, used for two-factor authentication or other communication purposes.
proxyId
string
Identifier for the proxy server associated with the bot, if applicable.
blueTick
boolean
Indicates whether the bot has a verified status (blue tick) on the platform it operates (e.g., Twitter).
appAuthSecret
string
A secret key used for authenticating the bot with the application. This is sensitive information and should be kept secure.
taskCount
integer
The number of tasks currently assigned to the bot.
profile
object
Contains detailed profile information about the bot, including fields such as id
, createdAt
, updatedAt
, and any relevant profile details like bio
, name
, banner
, avatar
, and website
.
histories
array of objects
An array containing the history of interactions or events related to the bot. Each history entry includes:
histories.id
string
Unique identifier for the history record.
histories.createdAt
datetime
Timestamp for when the history entry was created.
histories.updatedAt
datetime
Timestamp for when the history entry was last updated.
histories.type
string
The type of interaction (e.g., "BOT_INTERACTION"
).
interactionBot.id
string
Unique identifier for the interaction associated with the bot.
interactionBot.url
string (or null)
URL associated with the interaction, if applicable.
interactionBot.type
string
Type of interaction (e.g., "FOLLOW"
).
interactionBot.state
string
Current state of the interaction (e.g., "ERROR"
).
interactionBot.error
string (or null)
Specific error message related to the interaction, if any.
interactionBot.origin
string (or null)
The origin URL associated with the interaction.
interactionBot.createdAt
datetime
Timestamp indicating when the interaction was created.
interactionBot.updatedAt
datetime
Timestamp indicating when the interaction was last updated.
interactionBot.interactionAt
datetime
Timestamp tracking when the interaction occurred.
id
string
Unique identifier for the bot.
createdAt
datetime
Timestamp indicating when the bot was created.
BOT_STATUS Enum Breakdown
ERROR
This status indicates that the bot has encountered an error that prevents it from functioning correctly. This could be due to network issues, authentication failures, or other critical errors.
The bot may need to be reviewed or restarted by a user or administrator to resolve the underlying issue.
ACTIVE
The bot is currently operational and functioning as intended. It is actively performing tasks or interacting with users on the platform.
Users can expect the bot to behave normally, performing tasks like posting updates or interacting with users.
LOCKED
The bot has been locked, likely due to security concerns, platform policy violations, or manual intervention by an administrator.
The bot cannot perform any actions until unlocked. Review activities to ensure compliance with platform rules.
WAITING
The bot is in a waiting state, ready to execute tasks once certain conditions are met (e.g., waiting for user input, a scheduled time, or resource availability).
Used during transitions or when the bot is waiting for further instructions before proceeding.
LOGGING
The bot is in the process of logging in or authenticating with a service. This state is temporary and should change to either ACTIVE or ERROR depending on the success of the login process.
Monitor authentication attempts to determine if the bot successfully connects to the platform it interacts with.
SUSPENDED
The bot is temporarily suspended from activity, possibly due to concerns or violations. It may require review before becoming active again.
A suspended bot may need user intervention or a review process before it can be reinstated to ACTIVE status.
PROXY_FAILED
The bot was unable to connect to or utilize the proxy server it relies on. This failure can hinder the bot's ability to perform tasks requiring internet access.
Users should check the proxy configuration and ensure the proxy server is reachable and operational.
LOGIN_CODE_REQUEST
The bot is waiting for a login code, typically required for two-factor authentication (2FA). This state persists until the user provides the necessary code.
The bot needs user intervention to retrieve and input the 2FA code to proceed with operations.
BOT_ERROR_MESSAGE Enum Breakdown
AUTHENTICATION_REQUIRED
This error indicates that the bot is unable to authenticate with the platform or service. This could be due to missing or invalid credentials (e.g., username/password).
Prompts users to ensure the bot has correct authentication credentials and permissions to access the required resources.
PROXY_FAILED
This error indicates that the bot could not connect to the specified proxy server, possibly due to incorrect configuration or network issues.
Users should verify the proxy settings and ensure the proxy server is operational. Manual testing may be required.
EXPIRE_SESSION
This error indicates that the bot’s session has expired, often due to inactivity or expired authentication tokens.
Users may need to re-authenticate or refresh tokens to restore the bot's functionality.
INVALID_ACCOUNT
This error signifies that the account being used by the bot is invalid or no longer exists (e.g., deleted account or credential typos).
Users should verify the account details to ensure they are correct and that the account is active and valid.
BOT_INACTIVE
This error indicates that the bot is not active and unable to perform its tasks. It might have been deactivated or suspended by the platform.
Users should investigate the reason for the bot's inactivity and take actions to reactivate it, if necessary.
ACCOUNT_WAS_LOCKED
This error message indicates that the account associated with the bot has been locked, possibly due to suspicious activity or policy violations.
Users need to review the account status and may need to contact support to unlock the account before the bot can operate.
LOGIN_CODE_REQUEST
This error occurs when the bot is waiting for a login code, typically required for two-factor authentication (2FA).
Users should retrieve and input the 2FA code sent to their device or email to allow the bot to continue its operation.
Delete Bot By ID
Description
This endpoint allows you to delete (revoke) a bot from the system. The bot will be permanently removed, and the relevant data will no longer be accessible. The API call requires an authorized user with the appropriate permissions to delete a bot.
Request
URL:
Method:
DELETE
Authentication: This endpoint requires bearer token authentication or API key authentication.
Headers:
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type: application/json
Query Parameters:
appId
(string, required): The ID of the application to which the bot is associated.
Path Parameters:
botId
(string, required): The unique identifier of the bot to be deleted. Replace{botId}
in the URL with the actual bot ID.
Example Request
Response
On successful deletion, the response will return a JSON object with details about the bot that was deleted.
Status Code:
200 OK
Response Body:
Error Responses
401 Unauthorized: If the user is not authenticated or does not have the required permissions to delete the bot.
Notes
Make sure the
botId
is valid and the user has the necessary permissions to delete the bot.The
appId
should correspond to the application associated with the bot.
Refresh Bot API
Description
This endpoint allows you to refresh a bot's session in case of an expired session, login errors, or other session-related issues. It updates the bot’s authentication details and ensures that the bot is logged in again successfully. This is particularly useful when a bot encounters a session expiration error.
Request
URL:
Authentication: This endpoint requires bearer token authentication or API key authentication.
Headers:
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type: application/json
Query Parameters:
appId
(string, required): The ID of the application to which the bot is associated.
Path Parameters:
botId
(string, required): The unique identifier of the bot to be refreshed. Replace{botId}
in the URL with the actual bot ID.
Request Body: The request body must include the updated status of the bot.
Example Request
Response
On a successful update, the response will return the updated details of the bot.
Status Code:
200 OK
Create Task
Endpoint:
POST /v1/tasks
/v1/tasks
Description
This endpoint allows users to create a new task in the system. It requires specific parameters in the request body and query string. Upon successful creation, it will return the details of the newly created task.
Authentication
This endpoint requires bearer token authentication. Users must be authorized with the appropriate permissions to create a task.
Request Headers
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type
: application/json
Query Parameters
appId
string
Yes
The ID of the application to which the task will be associated.
Request Body
The request body must be a JSON object that conforms to the TaskCreateDTO
structure:
Field Descriptions
title
string
Yes
The title of the task being created.
categoryId
string
Yes
The ID of the category to which the task belongs.
postPerDay
number
Yes
The number of posts to be made per day for the task.
botIds
string[]
Yes
An array of bot IDs associated with the task.
customerGroupIds
string[]
Yes
An array of customer group IDs associated with the task.
type
TASK_TYPE
enum
Yes
The type of task (e.g., USERS, POSTS, KEYWORDS, USER_KEYWORDS)
templateContents
string[]
Yes
An array of template content strings used for the task.
Response
On successful creation, the response will return a JSON object structured as follows:
Success Response
Field Descriptions
data
object
The main response object containing the task details.
data.type
string
The type of the task (e.g., "USERS").
data.status
string
The current status of the task (e.g., "RUNNING").
data.title
string
The title of the task being created.
data.categoryId
string
The ID of the category to which the task belongs.
data.templateId
string
The ID of the template associated with the task.
data.posts
array
An array of post IDs associated with the task (initially empty).
data.images
array
An array of images associated with the task (initially empty).
data.keywords
array
An array of keywords associated with the task (initially empty).
data.keywordAddTagIds
array
An array of tag IDs to add to keywords (initially empty).
data.keywordAddGroupIds
array
An array of group IDs to add to keywords (initially empty).
data.id
string
The unique ID of the created task.
path
string
The endpoint path used for the request.
method
string
The HTTP method used for the request (e.g., "POST").
message
string
A success message indicating the task creation was successful.
statusCode
number
The HTTP status code of the response (200 indicates success).
Error Responses
400 Bad Request
If the request is malformed or required parameters are missing.
{ "statusCode": 400, "message": "Validation failed", "error": "Bad Request" }
401 Unauthorized
If the user is not authenticated or does not have the necessary permissions.
{ "statusCode": 401, "message": "Unauthorized", "error": "Unauthorized" }
Example Usage
Here is an example of how to call the endpoint using curl
:
Notes
Ensure that the
appId
is valid and the user has the necessary permissions for the application.Review the expected field types in the request body to ensure proper validation.
Get List of Running Tasks
GET /v1/tasks
Description
This endpoint retrieves a paginated list of tasks that are currently running. Users can filter tasks based on various criteria, such as task type, status, category IDs, and search terms.
Request Headers
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type
: application/json
Query Parameters
appId
string
Yes
The ID of the application associated with the tasks.
limit
number
No
The maximum number of tasks to return (default is 10).
offset
number
No
The number of tasks to skip before starting to collect the result set (default is 0).
search
string
No
A search string to filter tasks based on title or other criteria.
categoryIds
string[]
No
An array of category IDs to filter the tasks by specific categories.
type
string
No
The type of the tasks to filter (must be one of the defined TASK_TYPE
enum values).
status
string
No
The status of the tasks to filter (must be one of the defined TASK_STATUS
enum values).
isDeleted
string
No
To filter tasks based on their deletion status (if applicable).
Response
On successful retrieval, the response will return a JSON object structured as follows:
Success Response
Field Descriptions
data
object
The main response object containing the list of tasks.
data.data
array
An array of task objects returned by the API.
data.data[].id
string
The unique ID of the task.
data.data[].type
string
The type of the task (e.g., "USERS").
data.data[].title
string
The title of the task.
data.data[].status
string
The current status of the task (e.g., "RUNNING").
data.data[].categoryId
string
The ID of the category to which the task belongs.
data.data[].templateId
string
The ID of the template associated with the task.
data.data[].posts
array
An array of post IDs associated with the task (initially empty).
data.data[].images
array
An array of images associated with the task (initially empty).
data.data[].keywords
array
An array of keywords associated with the task (initially empty).
data.data[].keywordAddTagIds
array
An array of tag IDs to add to keywords (initially empty).
data.data[].keywordAddGroupIds
array
An array of group IDs to add to keywords (initially empty).
data.data[].botIds
array
An array of bot IDs associated with the task.
data.data[].customerGroupIds
array
An array of customer group IDs associated with the task.
data.data[].includeCustomerTagIds
array
An array of customer tag IDs to include in the task.
data.data[].excludeCustomerTagIds
array
An array of customer tag IDs to exclude from the task.
data.data[].botsCount
number
The count of bots associated with the task.
data.data[].categoryName
string
The name of the category to which the task belongs.
data.data[].templateContents
array
An array of contents associated with the task template (initially empty).
totalRunning
number
The total number of running tasks returned by the API.
path
string
The endpoint path used for the request.
method
string
The HTTP method used for the request (e.g., "GET").
message
string
A success message indicating that the task retrieval was successful.
statusCode
number
The HTTP status code of the response (200 indicates success).
Error Responses
400 Bad Request
If the request is malformed or required parameters are missing.
{ "statusCode": 400, "message": "Validation failed", "error": "Bad Request" }
401 Unauthorized
If the user is not authenticated or does not have the necessary permissions.
{ "statusCode": 401, "message": "Unauthorized", "error": "Unauthorized" }
Example Usage
Here is an example of how to call the endpoint using curl
:
Notes
Ensure that the
appId
is valid and the user has the necessary permissions for the application.You can modify the
limit
andoffset
parameters to paginate through the list of tasks.
Get List of Spam
GET /spams
/spams
Description
This endpoint retrieves a paginated list of spam records. Users can filter spam based on various criteria, including status, bot IDs, task IDs, and date ranges.
Request Headers
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type
: application/json
Query Parameters
Query Parameters
appId
string
Yes
The ID of the application associated with the spam records.
limit
number
No
The maximum number of spam records to return (default is 10).
offset
number
No
The number of spam records to skip before starting to collect the result set (default is 0).
status
string
No
The status of the spam records to filter (must be one of the defined SPAM_STATUS
enum values).
taskIds
string[]
No
An array of task IDs to filter spam records associated with specific tasks.
botIds
string[]
No
An array of bot IDs to filter spam records associated with specific bots.
groupIds
string[]
No
An array of group IDs to filter spam records associated with specific groups.
startDate
Date
No
The start date for filtering spam records.
endDate
Date
No
The end date for filtering spam records.
Response
On successful retrieval, the response will return a JSON object structured as follows:
Success Response
Field Descriptions
data
object
The main response object containing the list of spam records.
data.data
array
An array of spam objects returned by the API.
data.data[].id
string
The unique ID of the spam record.
data.data[].error
string
or null
Error message, if applicable (e.g., "TWEET_NOT_FOUND").
data.data[].status
string
The current status of the spam record (e.g., "DONE", "ERROR", "WAITING").
data.data[].postState
string
The state of the post (e.g., "CAN_POST").
data.data[].postView
number
The view count for the post.
data.data[].likeCount
number
The count of likes associated with the spam record.
data.data[].replyCount
number
The count of replies associated with the spam record.
data.data[].retweetCount
number
The count of retweets associated with the spam record.
data.data[].appId
string
The application ID associated with the spam record.
data.data[].botId
string
or null
The ID of the bot associated with the spam record, if applicable.
data.data[].jobId
string
The job ID associated with the spam record.
data.data[].taskId
string
The task ID associated with the spam record.
data.data[].images
array
An array of image URLs associated with the spam record (if any).
data.data[].content
string
or null
The content of the spam record (if applicable).
data.data[].tweetId
string
or null
The ID of the tweet associated with the spam record (if applicable).
data.data[].tweetUrl
string
or null
The URL of the tweet associated with the spam record (if applicable).
data.data[].customerId
string
The ID of the customer associated with the spam record.
data.data[].postTweetId
string
or null
The ID of the post associated with the spam record (if applicable).
data.data[].errorMessage
string
or null
Error message associated with the spam record, if applicable.
data.data[].paymentItemId
string
or null
Payment item ID associated with the spam record, if applicable.
data.data[].interactionJobId
string
or null
Job ID for interactions associated with the spam record, if applicable.
data.data[].isInteraction
boolean
Indicates if this record is part of an interaction.
data.data[].postTime
string
The timestamp when the spam was posted.
data.data[].createdAt
string
The timestamp when the spam record was created.
data.data[].updatedAt
string
The timestamp when the spam record was last updated.
data.data[].interactionAt
string
or null
The timestamp of the last interaction, if applicable.
data.data[].customer
object
An object containing details of the associated customer.
data.data[].task
object
An object containing details of the associated task.
data.data[].bot
object
An object containing details of the associated bot (if applicable).
data.total
number
The total number of spam records returned by the API.
data.stat
object
An object containing statistics related to the spam records (views, likes, replies, reposts).
path
string
The endpoint path used for the request.
method
string
The HTTP method used for the request (e.g., "GET").
message
string
A success message indicating that the spam retrieval was successful.
statusCode
number
The HTTP status code of the response (200 indicates success).
Error Responses
400 Bad Request
If the request is malformed or required parameters are missing.
{ "statusCode": 400, "message": "Validation failed", "error": "Bad Request" }
401 Unauthorized
If the user is not authenticated or does not have the necessary permissions.
{ "statusCode": 401, "message": "Unauthorized", "error": "Unauthorized" }
Example Usage
Here is an example of how to call the endpoint using curl
:
Notes
Ensure that the
appId
is valid and the user has the necessary permissions for the application.You can modify the
limit
,offset
,startDate
, andendDate
parameters to paginate through the list of spam records.
Create Group API
Endpoint:
POST /v1/customers/groups
Description: This endpoint allows you to create a new customer group for organizing customers.
Request:
URL:
/v1/customers/groups
Method:
POST
Headers:
Content-Type: application/json
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Body Parameters:
name
string
Yes
The name of the group you are creating.
Query Parameters:
appId
string
Yes
The application ID linked to the group creation.
Sample Request:
Payload:
Query Parameters:
Responses:
Field description:
Field Descriptions:
data
object
Contains information about the newly created group.
data.name
string
The name of the created group. In this example, "test shillbot"
.
data.id
string
The unique identifier assigned to the group. In this example, "25c93965-091f-4dff-abf0-e67877f663a9"
.
path
string
The API endpoint path that was accessed, including the query parameters. Shows the full request path.
method
string
The HTTP method used for the request. In this case, it is "POST"
.
message
string
A brief message indicating the result of the API call. "success"
means the group was created successfully.
statusCode
integer
The HTTP status code of the response. A value of 200
indicates that the request was successful.
Get Customer Groups API
Endpoint:
GET /v1/customers/groups
Description:
This endpoint retrieves a list of customer groups based on the provided query parameters, such as date ranges, application ID, and pagination details.
Authentication:
This endpoint requires bearer token authentication. The user must have appropriate permissions to access the customer groups.
Request:
URL:
/v1/customers/groups
Method:
GET
Headers:
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type: application/json
Query Parameters:
limit
integer
Yes
The maximum number of records to retrieve. Example: 1000
.
appId
string
Yes
The application ID to filter the customer groups by.
offset
integer
Yes
The offset for pagination, specifying where to start retrieving records. Example: 0
.
startDate
string
Yes
The start of the date range in ISO format. Example: 2024-10-07T00:00:00.000Z
.
endDate
string
Yes
The end of the date range in ISO format. Example: 2024-10-07T23:59:59.999Z
.
Sample Request:
Response:
Success Response:
Field Descriptions:
data
object
Contains the response details for customer groups.
data.total
integer
The total number of customer groups that match the query.
data.data
array
An array of customer group objects that match the query.
data.data.name
string
The name of the customer group. In this case, "test shillbot"
.
data.data.id
string
The unique identifier for the customer group.
path
string
The request path that was used, including the query parameters.
method
string
The HTTP method used for the request, in this case, "GET"
.
message
string
A brief message about the result of the API call. "success"
indicates that the request was processed successfully.
statusCode
integer
The HTTP status code returned by the server. A value of 200
indicates that the request was successful.
Notes:
Make sure that the appId is valid, and that the user has the necessary permissions to retrieve customer groups.
The limit and offset parameters can be used to paginate through the customer groups.
The startDate and endDate parameters filter the results within a specific date range.
Get List Tags
Endpoint:
GET /v1/customers/tags
Description:
This endpoint retrieves a list of customer tags based on the provided query parameters, such as date ranges, application ID, and pagination details. If no tags are found, the data
array will be empty.
Authentication:
This endpoint requires bearer token authentication. Users must have appropriate permissions to access the customer tags.
Request:
URL:
/v1/customers/tags
Method:
GET
Headers:
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type: application/json
Query Parameters:
limit
integer
Yes
The maximum number of records to retrieve. Example: 1000
.
appId
string
Yes
The application ID to filter the customer tags by.
offset
integer
Yes
The offset for pagination, specifying where to start retrieving records. Example: 0
.
startDate
string
Yes
The start of the date range in ISO format. Example: 2024-10-07T00:00:00.000Z
.
endDate
string
Yes
The end of the date range in ISO format. Example: 2024-10-07T23:59:59.999Z
.
Sample Request:
Response:
Success Response:
Field Descriptions:
data
object
Contains the response details for customer tags.
data.total
integer
The total number of customer tags that match the query. In this case, 0
indicates no tags were found.
data.data
array
An array of customer tag objects that match the query. In this case, the array is empty as no tags were found.
path
string
The request path that was used, including the query parameters.
method
string
The HTTP method used for the request, in this case, "GET"
.
message
string
A brief message about the result of the API call. "success"
indicates that the request was processed successfully.
statusCode
integer
The HTTP status code returned by the server. A value of 200
indicates that the request was successful.
Import User
Endpoint:
POST /v1/customers/batch
Description: This endpoint allows you to batch create or import customers into the system. You can use various filtering criteria or provide specific names, tags, and groups to associate customers with. The batch creation allows up to 1000 customer names in a single request.
Authentication:
This endpoint requires either:
Authorization: Bearer <your_token>
x-api-key: <your_api_key>
Request:
URL:
https://api.shillbot.xyz/v1/customers/batch?appId=yourAppId
Method:
POST
Headers:
Authorization: Bearer <your_token>
orx-api-key: <your_api_key>
Content-Type: application/json
Query Parameters:
appId
(string, required): The ID of the application that will be associated with the customers being created.
Request Body:
Payload Fields Description
Field
Type
Description
type
enum (required)
The type of batch operation. Must be one of the values defined in CUSTOMER_BATCH_TYPE
.
names
array of strings
An array of customer names to import. Limited to 1000 names per request.
tagIds
array of strings
An array of tag IDs to associate with the customers. Limited to 100 IDs.
groupIds
array of strings
An array of group IDs to associate with the customers. Limited to 100 IDs.
filter
object (optional)
Filtering criteria for importing customers.
ids
array of strings (optional)
Array of customer IDs to be included.
The request body must be a JSON object that follows the structure defined by the
Response:
On a successful request, the response will contain the path of the request, the HTTP method used, and a success message with status code 200.
Response Fields Description
Field
Type
Description
path
string
The API path used for the request.
method
string
The HTTP method used in the request. In this case, it will always be "POST"
.
message
string
Describes the result of the request. On success, this field will return "success"
.
statusCode
integer
The HTTP status code for the response. A value of 200
indicates that the request was successful.
Example Usage:
Here’s an example of how to call the endpoint using curl
:
Notifications API
Endpoint
GET /v1/bots/notification
Description
Retrieve a list of notifications for the user based on specified filters, including type, user details, and notification status.
Authentication
Bearer Token is required.
Parameters
limit
Integer
The number of notifications to return. Default: 30
.
appId
String
Application identifier. Required.
offset
Integer
The starting position for the list of notifications. Default: 0
.
startDate
Date
Start date in ISO 8601 format (e.g., 2024-11-02T00:00:00.000Z
). Required.
endDate
Date
End date in ISO 8601 format (e.g., 2024-11-02T23:59:59.999Z
). Required.
Response
Status: 200 OK
Response Body:
data.total: Integer - Total number of notifications.
data.unRead: Integer - Count of unread notifications.
data.data: Array - List of notification objects, each containing:
FieldTypeDescriptiontype
String
Notification type (e.g.,
users_liked_your_tweet
).fromUser
String
Display name of the user who triggered the notification.
fromUserId
String
ID of the user who triggered the notification.
fromUserName
String
Username of the user who triggered the notification.
fromUserAvatar
String
URL of the user's profile image.
tweetId
String
ID of the associated tweet, if applicable.
replyTweetId
String
ID of the reply tweet, if applicable.
mentionTweetId
String
ID of the mention tweet, if applicable.
notificationText
String
The text of the notification message.
read
Boolean
Read status of the notification.
isBot
Boolean
Indicates if the notification is bot-generated.
notificationAt
Date
Timestamp when the notification was created.
id
String
Unique identifier for the notification.
Example Request
Example Response
Example
Last updated