Applications

Applications are an essential part of The Local Universe — they are the foundation of creating features that users can enjoy. On this page, we’ll dive into the different application endpoints you can use to manage applications programmatically. We'll look at how to query, create, update, and delete applications.

The application model

The application model contains all the information about the application. In addition, applications can be paginated.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the application.

  • Name
    secret
    Type
    string
    Description

    Secret key to authenticate the application.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the application was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the application was last updated.


GET/v1/applications

List all applications

ADMIN ONLY

This endpoint allows you to retrieve a paginated list of all applications. By default, a maximum of ten applications are shown per page.

Optional attributes

  • Name
    page
    Type
    integer
    Description

    The page of applications to return.

  • Name
    limit
    Type
    integer
    Description

    Limit the number of applications returned.

Request

GET
/v1/applications
curl -G https://api.localuniverse.io/v1/applications \
  -H "Authorization: Bearer {token}" \
  -d page=1
  -d limit=10

Response

{
  "has_more": false,
  "data": [
    {
      "id": "xgQQXg3hrtjh7AvZ",
      "contact_id": "WAz8eIbvDR60rouK",
      "group_id": null,
      "pinned_message_id": null,
      "is_pinned": false,
      "is_muted": false,
      "last_active_at": 705103200,
      "last_opened_at": 705103200,
      "created_at": 692233200,
      "archived_at": null
    },
    {
      "id": "hSIhXBhNe8X1d8Et"
      // ...
    }
  ]
}

POST/v1/applications

Create an application

ADMIN ONLY

This endpoint allows you to create an application.

Required attributes

  • Name
    name
    Type
    string
    Description

    Name of the application which your clients will see.

Request

POST
/v1/applications
curl -X PUT https://api.localuniverse.io/v1/conversations/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}" \
  -d name="Super cool application"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "secret": "WAz8eIbvDR60rouK",
  "name": "Super cool application",
  "created_at": 705103200,
  "updated_at": 705103200
}

Was this page helpful?