Applications

Applications are the foundation for programmatic access to the Local Universe API. Each application gets a bot user and service credentials for authentication.

The application model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the application.

  • Name
    name
    Type
    string
    Description

    The name of the application.

  • Name
    owner
    Type
    User
    Description

    The user who owns this application.

  • Name
    bot
    Type
    User
    Description

    The bot user associated with this application.

  • Name
    created_at
    Type
    string
    Description

    When the application was created.


GET/v1/applications

List applications

Returns all applications owned by the authenticated user.

Request

GET
/v1/applications
curl https://api.localuniverse.io/v1/applications \
  -H "Authorization: Bearer {token}"

Response

[
  {
    "id": "1344387816333352652",
    "name": "My Bot",
    "owner": {
      "id": "1344387816333399999",
      "username": "tino"
    },
    "bot": {
      "id": "1344387816333355555",
      "username": "my-bot"
    },
    "created_at": "2025-02-26T19:17:12.848375Z"
  }
]

POST/v1/applications

Create an application

Create a new application. This also creates a bot user and generates service credentials (api_key and api_secret).

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the application.

Request

POST
/v1/applications
curl -X POST https://api.localuniverse.io/v1/applications \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Bot"}'

GET/v1/applications/:applicationId

Get an application

Retrieve an application by its ID.

Request

GET
/v1/applications/1344387816333352652
curl https://api.localuniverse.io/v1/applications/1344387816333352652 \
  -H "Authorization: Bearer {token}"

PATCH/v1/applications/:applicationId

Update an application

Optional attributes

  • Name
    name
    Type
    string
    Description

    New name for the application.

Request

PATCH
/v1/applications/1344387816333352652
curl -X PATCH https://api.localuniverse.io/v1/applications/1344387816333352652 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Bot Name"}'

DELETE/v1/applications/:applicationId

Delete an application

Permanently delete an application and its associated bot user.

Request

DELETE
/v1/applications/1344387816333352652
curl -X DELETE https://api.localuniverse.io/v1/applications/1344387816333352652 \
  -H "Authorization: Bearer {token}"

PATCH/v1/applications/:applicationId/bot

Update bot user

Update the bot user associated with this application.

Optional attributes

  • Name
    username
    Type
    string
    Description

    New username for the bot.

  • Name
    avatar
    Type
    string
    Description

    New avatar URL for the bot.

Request

PATCH
/v1/applications/1344387816333352652/bot
curl -X PATCH https://api.localuniverse.io/v1/applications/1344387816333352652/bot \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"username": "cool-bot"}'

POST/v1/applications/:applicationId/bot/reset

Reset bot token

Regenerate the service credentials for the bot. The old api_key and api_secret will be invalidated immediately.

Request

POST
/v1/applications/1344387816333352652/bot/reset
curl -X POST https://api.localuniverse.io/v1/applications/1344387816333352652/bot/reset \
  -H "Authorization: Bearer {token}"

Was this page helpful?