Accounts

List Accounts

Lists the workspace's connected accounts, newest first.

GET
/v1/accounts

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Query Parameters

limit?integer

Items per page. Defaults to 50. Maximum 100.

Range1 <= value <= 100
Default50
cursor?string

The nextCursor of the previous page. Omit it for the first page.

Length1 <= length
q?string

Searches display name, handle and platform. Matching ignores case.

Lengthlength <= 200
profile?string

Only accounts filed under the profile with this name. Letter case does not matter. Use none for accounts without a profile.

Lengthlength <= 60
platform?string

Only accounts on this platform.

Lengthlength <= 64
since?string

Only accounts connected at or after this time.

Formatdate-time
until?string

Only accounts connected before this time.

Formatdate-time
sort?string

Order by connection time. Defaults to created_desc.

Value in"created_desc""created_asc"
include?string

Comma-separated extras to add to the response: total.

Response Body

Accounts

application/json
  1. response
data*array<>
nextCursor*|

Cursor for the next page, or null on the last page.

hasMore*boolean

True when another page follows this one.

total?integer

Items matching the filters across every page. Present when include has total.

Example Request
import { Configuration, AccountsApi } from "@onepostly/sdk";const accountsApi = new AccountsApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await accountsApi.listAccounts();console.log(response);
Example Response
{  "data": [    {      "id": "acc_1699f4157fb643f49d2ac447491f3203",      "platform": "bluesky",      "displayName": "Your Brand",      "handle": "yourbrand.bsky.social",      "avatarUrl": "https://cdn.onepostly.com/avatars/yourbrand.jpg",      "status": "active",      "canAutoRenew": true,      "tokenExpiresAt": "2027-03-01T12:10:00.000Z",      "profile": "Business",      "metadata": {        "userId": "user_8412"      },      "createdAt": "2027-03-01T10:10:00.000Z",      "updatedAt": "2027-03-01T10:10:00.000Z"    },    {      "id": "acc_1699f4157fb643f49d2ac447491f3202",      "platform": "instagram",      "displayName": "Your Brand",      "handle": "yourbrand",      "avatarUrl": "https://cdn.onepostly.com/avatars/yourbrand.jpg",      "status": "active",      "canAutoRenew": true,      "tokenExpiresAt": "2027-05-14T10:00:00.000Z",      "profile": "Default",      "metadata": {},      "createdAt": "2027-03-01T10:05:00.000Z",      "updatedAt": "2027-03-01T10:05:00.000Z"    },    {      "id": "acc_1699f4157fb643f49d2ac447491f32a8",      "platform": "x",      "displayName": "Your Brand",      "handle": "yourbrand",      "avatarUrl": "https://cdn.onepostly.com/avatars/yourbrand.jpg",      "status": "active",      "canAutoRenew": true,      "tokenExpiresAt": "2027-05-14T10:00:00.000Z",      "profile": "Business",      "metadata": {},      "xSubscriptionType": "None",      "createdAt": "2027-03-01T10:00:00.000Z",      "updatedAt": "2027-03-01T10:00:00.000Z"    }  ],  "nextCursor": null,  "hasMore": false}