/account-abstraction/platforms/:platform/accounts

PUT

PUT /account-abstraction/platforms/:platform/accounts

The /account-abstraction/platforms/:platform/accounts endpoint allows to create a platform linked smart account for its users, e.g. a smart account used through telegram. It is designed to allow projects to create accounts on behalf of their users

You need to link an abstract account to your api key and fund it to use this endpoint. You can check the status of your abstract account through /project.

Please reach out to the Blessnet team to get setup.

Headers

Name
Value

x-api-key

Your API key

Path Variables

Name
Mandatory?
Default
Value

:platform

Yes

The platform, e.g. telegram.

:id

Yes

The user Id for that platform.

Request Body

  • required: true

  • content: application/json:

  • schema:

    • type: object

    {
      "userIds": <userIds>[]
    }
  • description: An array of valid operations.

Response Body

Name
Type
Description

accounts

array

List of accounts created or skipped

Example Request

POST /account-abstraction/platforms/telegram/accounts HTTP/1.1
Host: api.bless.net
x-api-key: <>
Content-Type: application/json
Content-Length: 763

{
    "userIds": ["1234", "134567"]
}

Response

{
    "message": "Accounts creation queued successfully",
    "newAccounts": 1,
    "existingAccounts": 1,
    "accounts": [
        {
            "account": "0x7dD3D4b1F3d374991d9F1DCA99d4AB625C2c881c",
            "userId": "1234",
            "message": "Account already exists"
        },
        {
            "account": "0x4eEe2CeCaE6c923a8C3a1457C7acd6D931126602",
            "userId": "134567",
            "message": "Account creation queued",
            "deliveryId": "67dad4181eb52d4d1d383ea9"
        }
    ]
}

Last updated