# Refresh

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /be/v1/refresh:
    post:
      summary: Refresh
      deprecated: false
      description: >+
        This endpoint allows users with a valid backend user refresh token
        (`POST /be/v1/login`) to refresh backend access token and backend
        refresh token.


      tags:
        - ROCKIT Edge - Backend API/Authentication
      parameters:
        - name: Authorization
          in: header
          description: >-
            Refresh token obtained from user login (org) [`POST
            /be/v1/login`](https://edge.api.cloud.rockitplay.com/user-login-org-11611254e0.md)
            or Refresh [`POST
            /be/v1/refresh`](https://edge.api.cloud.rockitplay.com/refresh-11630082e0.md)
          required: true
          example: Bearer {{_edge_org_admin_refresh_token}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tokenExpires:
                  type: number
                  description: Allows to set expiration time of access token.
                  minimum: 1
                  maximum: 3600
                  default: 900
              x-apidog-orders:
                - tokenExpires
              x-apidog-ignore-properties: []
            example: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: ' Indicates that the refresh request was successful.'
                  session:
                    type: object
                    properties:
                      access:
                        type: object
                        properties:
                          token:
                            type: string
                            description: >-
                              The access token used for accessing protected
                              backend endpoints as Bearer token.
                          expires:
                            type: integer
                            description: >-
                              A UNIX timestamp (integer) indicating when the
                              token expires.
                        x-apidog-orders:
                          - token
                          - expires
                        description: 'Contains the backend access token details:'
                        required:
                          - token
                          - expires
                        x-apidog-ignore-properties: []
                      id:
                        type: string
                        description: Contains session id.
                      refresh:
                        type: object
                        properties:
                          token:
                            type: string
                            description: >-
                              The refresh token used for refreshing access
                              token.
                          expires:
                            type: integer
                            description: >-
                              A UNIX timestamp (integer) indicating when the
                              token expires.
                        x-apidog-orders:
                          - token
                          - expires
                        description: 'Contains the backend refresh token details:'
                        required:
                          - token
                          - expires
                        x-apidog-ignore-properties: []
                    x-apidog-orders:
                      - access
                      - id
                      - refresh
                    required:
                      - access
                      - id
                      - refresh
                    description: 'Contains session data:'
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - session
                x-apidog-orders:
                  - status
                  - session
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Reflects that the creation failed due to one or more
                      invalid or missing parameters in the request.
                  error:
                    type: string
                    description: Contains an error identifier.  (e.g., "invalid-param")
                  message:
                    type: string
                    description: >-
                      Explains the nature of the invalid input (for example,
                      "name invalid").
                  detail:
                    type: string
                    description: >-
                      Offers further context on the error. (e.g., expected
                      pattern for the organization name)
                x-apidog-orders:
                  - 01JQMCJM5JW4CCDS5ZHTC2YC9Y
                x-apidog-refs:
                  01JQMCJM5JW4CCDS5ZHTC2YC9Y:
                    $ref: '#/components/schemas/Invalid%20Param'
                required:
                  - status
                  - error
                  - message
                  - detail
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
                  - detail
          headers: {}
          x-apidog-name: missing-param
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the organization creation request was
                      rejected because of authentication problems.
                  error:
                    type: string
                    description: Contains an error identifier. (e.g."unauthorized")
                  message:
                    type: string
                    description: >-
                      Provides details such as "invalid token" to help diagnose
                      the failure.
                x-apidog-orders:
                  - 01JQMCKAG0G4GPV31VK0GGTFWF
                x-apidog-refs:
                  01JQMCKAG0G4GPV31VK0GGTFWF:
                    $ref: '#/components/schemas/unauthorized'
                required:
                  - status
                  - error
                  - message
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
          headers: {}
          x-apidog-name: token-expired
      security: []
      x-apidog-folder: ROCKIT Edge - Backend API/Authentication
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/732774/apis/api-11630082-run
components:
  schemas:
    Invalid Param:
      type: object
      properties:
        status:
          type: string
          description: >-
            Reflects that the creation failed due to one or more invalid or
            missing parameters in the request.
        error:
          type: string
          description: Contains an error identifier.  (e.g., "invalid-param")
        message:
          type: string
          description: >-
            Explains the nature of the invalid input (for example, "name
            invalid").
        detail:
          type: string
          description: >-
            Offers further context on the error. (e.g., expected pattern for the
            organization name)
      required:
        - status
        - error
        - message
        - detail
      x-apidog-orders:
        - status
        - error
        - message
        - detail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    unauthorized:
      type: object
      properties:
        status:
          type: string
          description: >-
            Indicates that the organization creation request was rejected
            because of authentication problems.
        error:
          type: string
          description: Contains an error identifier. (e.g."unauthorized")
        message:
          type: string
          description: >-
            Provides details such as "invalid token" to help diagnose the
            failure.
      required:
        - status
        - error
        - message
      x-apidog-orders:
        - status
        - error
        - message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    Bearer token:
      type: bearer
      scheme: bearer
      description: >-
        Enter your Access Token. You can obtain this by calling the /be/v1/login
        endpoint. Use the Refresh token to get a new Access token when it
        expires.
servers:
  - url: https://Example-Server.com
    description: Default
security: []

```
