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-05-23T20:36:28Z",
"id": "bot_2gsqN2WBce1G43nvDIcQSk7fgvS",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2gsqN2WBce1G43nvDIcQSk7fgvS"
}
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_2gsqN2WBce1G43nvDIcQSk7fgvS
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_2gsqN2WBce1G43nvDIcQSk7fgvS
Response
Returns a 200 response on success
Example Response
{
"active": true,
"created_at": "2024-05-23T20:36:28Z",
"id": "bot_2gsqN2WBce1G43nvDIcQSk7fgvS",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2gsqN2WBce1G43nvDIcQSk7fgvS"
}
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": false,
"created_at": "2024-05-23T20:36:28Z",
"id": "bot_2gsqN2WBce1G43nvDIcQSk7fgvS",
"name": "inactive bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2gsqN2WBce1G43nvDIcQSk7fgvS"
}
],
"next_page_uri": "https://api.ngrok.com/bot_users?before_id=bot_2gsqN2WBce1G43nvDIcQSk7fgvS&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_2gsqN2WBce1G43nvDIcQSk7fgvS
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-05-23T20:36:28Z",
"id": "bot_2gsqN2WBce1G43nvDIcQSk7fgvS",
"name": "inactive bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2gsqN2WBce1G43nvDIcQSk7fgvS"
}
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 |