postzen-dev Accounts API

List and disconnect connected social accounts.

Operations 5

GET /v1/accounts List accounts #
DELETE /v1/accounts/{accountId} Disconnect an account #
GET /v1/accounts/{accountId}/pinterest-boards List Pinterest boards #
POST /v1/accounts/{accountId}/pinterest-boards Create Pinterest board #
PUT /v1/accounts/{accountId}/pinterest-boards Set default Pinterest board #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/postzen-dev:postzen-dev-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

postzen-dev-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostZen Public Accounts API
  version: 1.0.0
  description: The PostZen Public API lets server-side integrations manage profiles, connected social accounts, OAuth connection flows, media uploads, post creation, and outbound webhooks.
servers:
- url: https://api.postzen.dev
  description: Production API
security:
- bearerAuth: []
tags:
- name: Accounts
  description: List and disconnect connected social accounts.
paths:
  /v1/accounts:
    get:
      tags:
      - Accounts
      operationId: listAccounts
      summary: List accounts
      description: Returns connected social accounts available to the API key, sorted by connection date (newest first). Read-only and read-write API keys are accepted.
      parameters:
      - name: profileId
        in: query
        description: Filter accounts by profile id.
        schema:
          type: string
      - name: platform
        in: query
        description: Filter accounts by platform. `twitter` is accepted as an alias for `x`.
        schema:
          $ref: '#/components/schemas/PublicPlatformInput'
      - name: status
        in: query
        description: '`connected` returns healthy accounts. `disconnected` returns accounts that need reconnection or are disabled.'
        schema:
          type: string
          enum:
          - connected
          - disconnected
      - name: page
        in: query
        description: 1-based page number. Must be provided with `limit`.
        schema:
          type: integer
          minimum: 1
      - name: limit
        in: query
        description: Page size. Must be provided with `page`.
        schema:
          type: integer
          minimum: 1
          maximum: 100
      responses:
        '200':
          description: Accounts returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsListResponse'
              example:
                accounts:
                - _id: j97kp4mw2xnv6r1t8c3zq5bs9fh0yg4d
                  platform: twitter
                  providerAccountId: '1934567890123456789'
                  profileId:
                    _id: jh72r5nqk9wx3v8m1t4cz6bs0fy5dg3e
                    name: Marketing Team
                    slug: marketing-team
                    color: '#4caf50'
                  username: acme
                  displayName: Acme
                  profileUrl: https://x.com/acme
                  status: connected
                  isActive: true
                  connectedAt: '2026-06-13T16:00:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /v1/accounts/{accountId}:
    delete:
      tags:
      - Accounts
      operationId: disconnectAccount
      summary: Disconnect an account
      description: Disconnects and removes a connected social account. Pending scheduled, queued, and publishing targets for that account are canceled. This endpoint requires a read-write API key.
      parameters:
      - name: accountId
        in: path
        required: true
        description: PostZen account id.
        schema:
          type: string
      responses:
        '200':
          description: Account disconnected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              example:
                message: Account disconnected successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /v1/accounts/{accountId}/pinterest-boards:
    parameters:
    - name: accountId
      in: path
      required: true
      description: PostZen id of a connected Pinterest account.
      schema:
        type: string
    get:
      tags:
      - Accounts
      operationId: getPinterestBoards
      summary: List Pinterest boards
      description: Lists boards owned by a connected Pinterest account. Read-only and read-write API keys are accepted.
      responses:
        '200':
          description: Pinterest boards returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinterestBoardsResponse'
              example:
                boards:
                - id: '123456789012345678'
                  name: Product inspiration
                  description: Ideas for upcoming launches
                  privacy: PUBLIC
                  pinCount: 42
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '424':
          description: The Pinterest account is no longer connected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: not_connected
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          description: Pinterest could not answer the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: request_failed
    post:
      tags:
      - Accounts
      operationId: createPinterestBoard
      summary: Create Pinterest board
      description: Creates a board for the connected Pinterest account. This endpoint requires a read-write API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PinterestCreateBoardRequest'
            example:
              name: Product inspiration
              description: Ideas for upcoming launches
              privacy: PUBLIC
      responses:
        '201':
          description: Pinterest board created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinterestBoardResponse'
              example:
                board:
                  id: '123456789012345678'
                  name: Product inspiration
                  description: Ideas for upcoming launches
                  privacy: PUBLIC
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '424':
          description: The Pinterest account is no longer connected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: not_connected
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          description: Pinterest could not create the board.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: request_failed
    put:
      tags:
      - Accounts
      operationId: updatePinterestBoards
      summary: Set default Pinterest board
      description: Verifies a Pinterest board and stores it as the account default used when a pin target omits `settings.boardId`. This endpoint requires a read-write API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PinterestDefaultBoardRequest'
            example:
              defaultBoardId: '123456789012345678'
              defaultBoardName: Product inspiration
      responses:
        '200':
          description: Default Pinterest board updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinterestDefaultBoardResponse'
              example:
                message: Default Pinterest board updated successfully
                account:
                  _id: j97kp4mw2xnv6r1t8c3zq5bs9fh0yg4d
                  platform: pinterest
                  providerAccountId: '987654321098765432'
                  profileId:
                    _id: jh72r5nqk9wx3v8m1t4cz6bs0fy5dg3e
                    name: Marketing Team
                    slug: marketing-team
                    color: '#4caf50'
                  username: acme
                  displayName: Acme
                  status: connected
                  isActive: true
                  connectedAt: '2026-06-19T16:00:00.000Z'
                  defaultBoardId: '123456789012345678'
                  defaultBoardName: Product inspiration
        '400':
          description: Invalid request or the selected board does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: board_not_found
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '424':
          description: The Pinterest account is no longer connected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: not_connected
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          description: Pinterest could not verify the board.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: request_failed
components:
  schemas:
    AccountsListResponse:
      type: object
      required:
      - accounts
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/Account'
        pagination:
          $ref: '#/components/schemas/Pagination'
    Pagination:
      type: object
      required:
      - page
      - limit
      - total
      - totalPages
      properties:
        page:
          type: integer
          minimum: 1
        limit:
          type: integer
          minimum: 1
          maximum: 100
        total:
          type: integer
          minimum: 0
        totalPages:
          type: integer
          minimum: 0
    PublicPlatformOutput:
      type: string
      enum:
      - twitter
      - instagram
      - tiktok
      - linkedin
      - facebook
      - youtube
      - threads
      - pinterest
      - bluesky
      - telegram
    PinterestBoardResponse:
      type: object
      required:
      - board
      properties:
        board:
          type: object
          required:
          - id
          - name
          properties:
            id:
              type: string
            name:
              type: string
            description:
              type: string
            privacy:
              type: string
              enum:
              - PUBLIC
              - PROTECTED
              - SECRET
    PinterestDefaultBoardResponse:
      type: object
      required:
      - message
      - account
      properties:
        message:
          type: string
          const: Default Pinterest board updated successfully
        account:
          $ref: '#/components/schemas/Account'
    PinterestBoardsResponse:
      type: object
      required:
      - boards
      properties:
        boards:
          type: array
          items:
            $ref: '#/components/schemas/PinterestBoard'
    MessageResponse:
      type: object
      required:
      - message
      properties:
        message:
          type: string
    PublicPlatformInput:
      type: string
      enum:
      - twitter
      - x
      - instagram
      - tiktok
      - linkedin
      - facebook
      - youtube
      - threads
      - pinterest
      - bluesky
      - telegram
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
        type:
          type: string
        code:
          type: string
        param:
          type:
          - string
          - 'null'
    RateLimitError:
      type: object
      required:
      - error
      - retryAfter
      properties:
        error:
          type: string
          const: rate_limited
        retryAfter:
          type: integer
          minimum: 1
          description: Number of seconds to wait before retrying.
    PinterestBoard:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        privacy:
          type: string
          enum:
          - PUBLIC
          - PROTECTED
          - SECRET
        pinCount:
          type: integer
          minimum: 0
    AccountProfileSummary:
      type: object
      required:
      - _id
      - name
      - slug
      - color
      properties:
        _id:
          type: string
        name:
          type: string
        slug:
          type: string
        color:
          type: string
    Account:
      type: object
      required:
      - _id
      - platform
      - providerAccountId
      - profileId
      - username
      - displayName
      - status
      - isActive
      - connectedAt
      properties:
        _id:
          type: string
        platform:
          $ref: '#/components/schemas/PublicPlatformOutput'
        providerAccountId:
          type: string
        profileId:
          $ref: '#/components/schemas/AccountProfileSummary'
        username:
          type: string
        displayName:
          type: string
        profileUrl:
          type: string
          format: uri
        avatarUrl:
          type: string
          format: uri
        status:
          type: string
          enum:
          - connected
          - needsReauth
          - disconnected
          - disabled
        isActive:
          type: boolean
        connectedAt:
          type: string
          format: date-time
        lastSyncedAt:
          type: string
          format: date-time
        defaultBoardId:
          type: string
          description: Default Pinterest board id. Present only when one has been selected for a Pinterest account.
        defaultBoardName:
          type: string
          description: Default Pinterest board name. Present when Pinterest returned a name for the selected default board.
    PinterestDefaultBoardRequest:
      type: object
      additionalProperties: false
      required:
      - defaultBoardId
      properties:
        defaultBoardId:
          type: string
          minLength: 1
        defaultBoardName:
          type: string
    PinterestCreateBoardRequest:
      type: object
      additionalProperties: false
      required:
      - name
      properties:
        name:
          type: string
          minLength: 1
        description:
          type: string
        privacy:
          type: string
          enum:
          - PUBLIC
          - PROTECTED
          - SECRET
          default: PUBLIC
  responses:
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Failed to create post
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Not found
    TooManyRequests:
      description: Rate limit exceeded. Retry after the interval indicated by the `Retry-After` header.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          example:
            error: rate_limited
            retryAfter: 30
    Forbidden:
      description: The API key does not have sufficient permission or profile access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: API key requires read_write permission
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: JSON body is required
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: PostZen API key.