> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yousonder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the account

> Who this API key belongs to. Call it when an author pastes their key, to confirm it works and show whose account is connected.



## OpenAPI

````yaml /api-reference/openapi.json get /account
openapi: 3.1.0
info:
  title: Sonder API
  version: 1.0.0
  description: >-
    Read an author's Sonder videos, views, viral days and view milestones. Every
    request uses an API key the author creates in Sonder, and sees that author's
    data only.
servers:
  - url: https://api.yousonder.com/v1
    description: Production
  - url: https://sonder-server-production.up.railway.app/v1
    description: Production (direct address)
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Who the key belongs to.
  - name: Books
    description: The author's books.
  - name: Videos
    description: Posted videos with views, viral status and milestones.
  - name: Stats
    description: Day-by-day views.
  - name: Events
    description: Viral and milestone moments, for polling.
  - name: Connect
    description: One-click connect (OAuth 2.0).
paths:
  /account:
    get:
      tags:
        - Account
      summary: Get the account
      description: >-
        Who this API key belongs to. Call it when an author pastes their key, to
        confirm it works and show whose account is connected.
      operationId: getAccount
      responses:
        '200':
          description: The account.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/Account'
              example:
                success: true
                data:
                  id: 2c6f9a10-3d4b-4e8f-9a1b-7c5d3e2f1a09
                  name: Jane Author
                  email: jane@example.com
                  connected_platforms:
                    - instagram
                    - tiktok
                    - youtube
                  videos_posted: 86
                  views_updated_at: '2026-09-16T09:07:44.000Z'
                  api_key:
                    name: Publisher Champ
                    created_at: '2026-09-12T10:31:02.000Z'
                    connected_app: false
        '401':
          description: The API key is missing, malformed or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error:
                  code: invalid_api_key
                  message: >-
                    That API key is not valid. Check it was copied in full, or
                    create a new one in Sonder under Settings → API keys.
        '403':
          description: The author's Sonder plan isn't active.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error:
                  code: plan_inactive
                  message: >-
                    This Sonder account doesn't have an active plan, so its data
                    isn't shared. The key works again as soon as the plan is
                    active.
        '429':
          description: >-
            More than 60 requests in a minute with this key. Wait for the
            seconds in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error:
                  code: rate_limited
                  message: >-
                    Too many requests. Each key allows 60 a minute; try again
                    after the time in the Retry-After header.
components:
  schemas:
    Account:
      type: object
      required:
        - id
        - name
        - email
        - connected_platforms
        - videos_posted
        - views_updated_at
        - api_key
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The author's Sonder account ID. Stable; use it to match the account
            on your side.
        name:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
          format: email
        connected_platforms:
          type: array
          items:
            type: string
          description: Social accounts connected to Sonder for posting.
        videos_posted:
          type: integer
          description: Videos posted through Sonder.
        views_updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When Sonder last refreshed any of their views.
        api_key:
          type: object
          required:
            - name
            - created_at
            - connected_app
          properties:
            name:
              type: string
            created_at:
              type: string
              format: date-time
            connected_app:
              type: boolean
              description: >-
                True when the key came from one-click connect rather than being
                pasted.
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable, machine-readable reason.
              enum:
                - missing_api_key
                - invalid_api_key
                - api_key_revoked
                - plan_inactive
                - rate_limited
                - invalid_parameter
                - range_too_long
                - not_found
                - internal_error
            message:
              type: string
              description: What went wrong and what to do, in plain English.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An API key from Sonder → Settings → API keys, like `sonder_live_…`.

````