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

# Refresh superadmin token

> Rotate the superadmin access and refresh tokens. The old refresh token is revoked on success, and the response returns the replacement token pair.



## OpenAPI

````yaml /api/superadmin.openapi.yaml post /auth/refresh
openapi: 3.1.0
info:
  title: YouNegotiate Superadmin API
  version: '2.0'
  description: Stateless API endpoints for the Superadmin portal.
servers:
  - url: https://api.hub.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public superadmin domain system and health endpoints.
  - name: Authentication
    description: Superadmin login, logout, password reset, and password change endpoints.
  - name: Profile
    description: Authenticated superadmin profile endpoints.
  - name: Admin Configuration
    description: Platform configuration values and feature flag controls.
  - name: MailHub Users
    description: Superadmin management for EcoMail Hub / EcoPortal users.
  - name: Super Admin Users
    description: Superadmin management for platform operations users.
  - name: Consumers
    description: Superadmin consumer account list, detail, filter, and export endpoints.
  - name: Creditors
    description: Superadmin creditor account list and account access endpoints.
  - name: Sub Accounts
    description: Superadmin sub account list and export endpoints.
  - name: Reseller Partners
    description: Superadmin reseller partner list and report-history endpoints.
  - name: Special Plan Inquiries
    description: >-
      Superadmin special membership inquiry list, detail, resolve, and close
      endpoints.
  - name: Plans
    description: >-
      Superadmin membership plan list, create, update, reorder, visibility, and
      delete endpoints.
  - name: Failed - Canceled
    description: Superadmin failed or cancelled membership list and custom email endpoints.
  - name: Merchant Requests
    description: >-
      Superadmin merchant API request list, export, email, forwarding, progress,
      and approval endpoints.
  - name: Bill Pay Donations
    description: Superadmin Bill Pay gift donation list, export, and receipt endpoints.
  - name: Export & Reporting
    description: Superadmin generated report options and CSV download endpoints.
  - name: Communications / Templates
    description: >-
      Superadmin email and SMS template management for manual communications and
      campaigns.
  - name: Communications / Groups
    description: >-
      Superadmin communication group management for dynamic consumer targeting
      and campaign selection.
  - name: Communications / Schedule Campaign
    description: >-
      Superadmin email and SMS campaign scheduling, immediate send, and delivery
      queue endpoints.
  - name: Communications / Campaign Tracker
    description: >-
      Superadmin campaign tracker snapshots, refresh actions, and consumer
      exports.
  - name: Automated Communications
    description: >-
      Superadmin automated email/SMS templates, trigger configuration, and
      delivery history endpoints.
paths:
  /auth/refresh:
    post:
      tags:
        - Authentication
      summary: Refresh superadmin token
      description: >-
        Rotate the superadmin access and refresh tokens. The old refresh token
        is revoked on success, and the response returns the replacement token
        pair.
      operationId: superadminRefreshToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
            example:
              refresh_token: refresh-token
      responses:
        '200':
          description: Token refreshed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefreshTokenResponse'
              example:
                message: Token refreshed.
                meta:
                  access_token: 1|new-access-token
                  refresh_token: new-refresh-token
                  token_type: Bearer
                  access_token_expires_at: '2026-06-05T13:00:00.000000Z'
                  refresh_token_expires_at: '2026-07-05T12:00:00.000000Z'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    RefreshTokenRequest:
      type: object
      required:
        - refresh_token
      properties:
        refresh_token:
          type: string
    RefreshTokenResponse:
      type: object
      required:
        - message
        - meta
      properties:
        message:
          type: string
          example: Token refreshed.
        meta:
          type: object
          required:
            - access_token
            - refresh_token
            - token_type
            - access_token_expires_at
            - refresh_token_expires_at
          properties:
            access_token:
              type: string
            refresh_token:
              type: string
              description: >-
                Plaintext refresh token returned once. Store securely and send
                to POST /auth/refresh.
            token_type:
              type: string
              example: Bearer
            access_token_expires_at:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                Access token expiry timestamp when an expiry is assigned;
                otherwise null.
            refresh_token_expires_at:
              type: string
              format: date-time
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'

````