Bot Users
Create Bot User
Create a new bot user
Request
POST /bot_users
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"name":"new bot user from API"}' \
https://api.ngrok.com/bot_users
Parameters
Name | Type | Description |
---|---|---|
name | string | human-readable name used to identify the bot |
active | boolean | whether or not the bot is active |
Response
Returns a 201 response on success
Example Response
{
"active": true,
"created_at": "2024-08-02T07:15:45Z",
"id": "bot_2k5okzSVSod8uyxwRSxtEBYuUub",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this bot user |
name | string | human-readable name used to identify the bot |
active | boolean | whether or not the bot is active |
created_at | string | timestamp when the api key was created, RFC 3339 format |
Delete Bot User
Delete a bot user by ID
Request
DELETE /bot_users/{id}
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub
Response
Returns a 204 response with no body on success
Get Bot User
Get the details of a Bot User by ID.
Request
GET /bot_users/{id}
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub
Response
Returns a 200 response on success
Example Response
{
"active": true,
"created_at": "2024-08-02T07:15:45Z",
"id": "bot_2k5okzSVSod8uyxwRSxtEBYuUub",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this bot user |
name | string | human-readable name used to identify the bot |
active | boolean | whether or not the bot is active |
created_at | string | timestamp when the api key was created, RFC 3339 format |
List Bot Users
List all bot users in this account.
Request
GET /bot_users
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/bot_users?limit=1
Response
Returns a 200 response on success
Example Response
{
"bot_users": [
{
"active": true,
"created_at": "2024-08-02T07:15:45Z",
"id": "bot_2k5ol4lHRodaV34O3fH46VCyESC",
"name": "API example bot user",
"uri": "https://api.ngrok.com/bot_users/bot_2k5ol4lHRodaV34O3fH46VCyESC"
}
],
"next_page_uri": "https://api.ngrok.com/bot_users?before_id=bot_2k5ol4lHRodaV34O3fH46VCyESC&limit=1",
"uri": "https://api.ngrok.com/bot_users"
}
Fields
Name | Type | Description |
---|---|---|
bot_users | BotUser | the list of all bot users on this account |
uri | string | URI of the bot users list API resource |
next_page_uri | string | URI of the next page, or null if there is no next page |
BotUser fields
Name | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this bot user |
name | string | human-readable name used to identify the bot |
active | boolean | whether or not the bot is active |
created_at | string | timestamp when the api key was created, RFC 3339 format |
Update Bot User
Update attributes of a bot user by ID.
Request
PATCH /bot_users/{id}
Example Request
curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"active":false,"name":"inactive bot user from API"}' \
https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub
Parameters
Name | Type | Description |
---|---|---|
id | string | |
name | string | human-readable name used to identify the bot |
active | boolean | whether or not the bot is active |
Response
Returns a 200 response on success
Example Response
{
"active": false,
"created_at": "2024-08-02T07:15:45Z",
"id": "bot_2k5okzSVSod8uyxwRSxtEBYuUub",
"name": "inactive bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this bot user |
name | string | human-readable name used to identify the bot |
active | boolean | whether or not the bot is active |
created_at | string | timestamp when the api key was created, RFC 3339 format |