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

# Create a new Device Onboarding Session

> This endpoint creates a new onboarding session
                and generates an authentication URL which leads to Connect UI.
                This application takes end-users through onboarding their device.
                Upon success, it redirects back to the success_url.
                If unsuccessful, it redirects to the cancel_url.
                Sessions are valid until the end of the next day.



## OpenAPI

````yaml https://app.podero.com/api/partners/v2.0/openapi.json post /api/partners/v2.0/device-onboarding
openapi: 3.1.0
info:
  title: Podero Partner API
  version: '2.0'
  description: >-
    This API provides a unified interaction point for Podero's partner
    companies.


    The goal of this API is to give partners easily integratable endpoints that
    don't require extensive software

    development. For this reason, the endpoints focus around user and device
    management, setting of preferences

    and high level device controls.


    While direct control of devices is implemented for special use cases such as
    pause power, we abstract away low level

    direct device steering so developers and partners can focus on delivering
    maximum value to end users.
  termsOfService: https://www.podero.com/terms-and-conditions
servers: []
security: []
paths:
  /api/partners/v2.0/device-onboarding:
    post:
      tags:
        - Device Onboarding Sessions
      summary: Create a new Device Onboarding Session
      description: |-
        This endpoint creates a new onboarding session
                        and generates an authentication URL which leads to Connect UI.
                        This application takes end-users through onboarding their device.
                        Upon success, it redirects back to the success_url.
                        If unsuccessful, it redirects to the cancel_url.
                        Sessions are valid until the end of the next day.
      operationId: >-
        integrations_api_api_v2_device_onboarding_router_create_onboarding_session
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceOnboardingSessionInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceOnboardingSessionOutput'
      security:
        - OAuth2: []
components:
  schemas:
    DeviceOnboardingSessionInput:
      properties:
        language:
          allOf:
            - $ref: '#/components/schemas/Language'
          default: en
        price_zone_default:
          anyOf:
            - $ref: '#/components/schemas/PriceZone'
            - type: 'null'
        is_smart_optimization_active_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Smart Optimization Active Default
        skip_to:
          anyOf:
            - $ref: '#/components/schemas/SkipToType'
            - type: 'null'
        success_url:
          maxLength: 8000
          title: Redirect URL upon onboarding success
          type: string
        cancel_url:
          maxLength: 8000
          title: Redirect URL upon onboarding error
          type: string
        user_id:
          format: uuid
          title: User
          type: string
        external_metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: External Metadata
      required:
        - success_url
        - cancel_url
        - user_id
      title: DeviceOnboardingSessionInput
      type: object
    DeviceOnboardingSessionOutput:
      properties:
        authentication_url:
          title: Authentication Url
          type: string
        id:
          format: uuid
          title: Id
          type: string
        user:
          format: uuid
          title: User
          type: string
        price_zone_default:
          anyOf:
            - $ref: '#/components/schemas/PriceZone'
            - type: 'null'
        is_smart_optimization_active_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Smart Optimization Active Default
        skip_to:
          anyOf:
            - $ref: '#/components/schemas/SkipToType'
            - type: 'null'
        success_url:
          maxLength: 8000
          title: Redirect URL upon onboarding success
          type: string
        cancel_url:
          maxLength: 8000
          title: Redirect URL upon onboarding error
          type: string
        expiration_date:
          format: date
          title: Expiration date of the session
          type: string
        object_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Object Id
        external_metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: External Metadata
        language:
          default: en
          maxLength: 255
          title: Language of the onboarding session
          type: string
      required:
        - authentication_url
        - id
        - user
        - success_url
        - cancel_url
      title: DeviceOnboardingSessionOutput
      type: object
    Language:
      enum:
        - sv
        - de
        - en
        - hu
        - it
        - et
        - pl
        - ro
      title: Language
      type: string
    PriceZone:
      enum:
        - AT
        - AT_HOURLY
        - BE
        - CH
        - EE
        - DE_LU
        - HU
        - IT_CNOR
        - IT_CSUD
        - IT_NORD
        - IT_PUN
        - IT_SARD
        - IT_SICI
        - IT_SUD
        - PT
        - RO
        - SE_1
        - SE_2
        - SE_3
        - SE_4
        - UK
      title: PriceZone
      type: string
    SkipToType:
      enum:
        - ev
        - iv
        - wb
        - hp
      title: SkipToType
      type: string
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        password:
          tokenUrl: /api/partners/v2.0/auth/token
          scopes: {}
        clientCredentials:
          tokenUrl: /api/partners/v2.0/auth/token
          scopes: {}

````