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

# Set Roles

> Sets the subscription or charging payer role for a vehicle. Requires a Tesla Business account.



## OpenAPI

````yaml post /{vin}/roles
openapi: 3.0.0
info:
  title: Tessie API
  version: 1.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: The Tesla management platform.
  contact:
    name: Tessie
    url: https://tessie.com
    email: support@tessie.com
  x-logo:
    url: ''
  termsOfService: https://tessie.com/terms
servers:
  - url: https://api.tessie.com
security:
  - bearerAuth: []
tags:
  - name: Driver Management
    description: Driver management endpoints
  - name: Telemetry Configuration
    description: Vehicle telemetry configuration endpoints
  - name: Vehicle Commands
    description: Vehicle command endpoints
  - name: Vehicle Data
    description: Vehicle data endpoints
paths:
  /{vin}/roles:
    parameters:
      - $ref: '#/components/parameters/vin'
    post:
      tags:
        - Driver Management
      summary: Set Roles
      description: >-
        Sets the subscription or charging payer role for a vehicle. Requires a
        Tesla Business account.
      operationId: set-roles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - role
              x-examples:
                Example 1:
                  role: SUBSCRIPTION
                  account_id: '555555555'
              properties:
                role:
                  type: string
                  enum:
                    - SUBSCRIPTION
                    - CHARGING
                  description: The payer role to assign.
                account_id:
                  type: string
                  description: The Tesla account ID to assign the payer role to.
                federation_id:
                  type: string
                  description: The Tesla federation ID to assign the payer role to.
            examples:
              Example 1:
                value:
                  role: SUBSCRIPTION
                  account_id: '555555555'
              Example 2:
                value:
                  role: CHARGING
                  federation_id: 11111111-2222-3333-4444-555555555555
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                x-examples:
                  Example 1:
                    result: true
              examples:
                Example 1:
                  value:
                    result: true
components:
  parameters:
    vin:
      name: vin
      description: The associated VIN.
      schema:
        type: string
      in: path
      required: true
      deprecated: false
      x-last-modified: 1643747623235
      example: 5YJXCAE43LF123456
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````