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

# Create station

> Registers a station under the organization; the optional password becomes its OCPP Basic auth secret.



## OpenAPI

````yaml /openapi.json post /charging-stations
openapi: 3.1.0
info:
  title: CSMS API
  description: Backend API documentation
  version: 0.0.0
servers: []
security: []
paths:
  /charging-stations:
    post:
      tags:
        - charging stations
      summary: Create station
      description: >-
        Registers a station under the organization; the optional password
        becomes its OCPP Basic auth secret.
      operationId: postChargingStations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                identifier:
                  type: string
                  minLength: 1
                  maxLength: 64
                name:
                  type: string
                  minLength: 1
                latitude:
                  type: number
                  minimum: -90
                  maximum: 90
                longitude:
                  type: number
                  minimum: -180
                  maximum: 180
                address:
                  type: string
                placeId:
                  type: string
                  minLength: 1
                password:
                  type: string
                  minLength: 8
                groupId:
                  type: number
              required:
                - identifier
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  chargingStation:
                    type: object
                    properties:
                      id:
                        type: number
                      identifier:
                        type: string
                      name:
                        anyOf:
                          - type: string
                          - type: 'null'
                      protocol:
                        anyOf:
                          - type: string
                            enum:
                              - OCPP_1_6
                              - OCPP_2_0_1
                          - type: 'null'
                      latitude:
                        anyOf:
                          - type: number
                          - type: 'null'
                      longitude:
                        anyOf:
                          - type: number
                          - type: 'null'
                      address:
                        anyOf:
                          - type: string
                          - type: 'null'
                      placeId:
                        anyOf:
                          - type: string
                          - type: 'null'
                      vendorName:
                        anyOf:
                          - type: string
                          - type: 'null'
                      model:
                        anyOf:
                          - type: string
                          - type: 'null'
                      serialNumber:
                        anyOf:
                          - type: string
                          - type: 'null'
                      firmwareVersion:
                        anyOf:
                          - type: string
                          - type: 'null'
                      lastBootAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          - type: 'null'
                      lastSeenAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          - type: 'null'
                      lastConnectedAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          - type: 'null'
                      lastDisconnectedAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          - type: 'null'
                      organizationId:
                        type: number
                      groupId:
                        anyOf:
                          - type: number
                          - type: 'null'
                      createdAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      updatedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      evses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            evseId:
                              type: number
                            chargingStationId:
                              type: number
                            createdAt:
                              type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            updatedAt:
                              type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            connectors:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: number
                                  connectorId:
                                    type: number
                                  status:
                                    type: string
                                    enum:
                                      - AVAILABLE
                                      - OCCUPIED
                                      - RESERVED
                                      - UNAVAILABLE
                                      - FAULTED
                                  statusDetail:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  errorCode:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - TYPE2
                                          - CCS2
                                          - CHADEMO
                                          - OTHER
                                      - type: 'null'
                                  maxPower:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  evseId:
                                    type: number
                                  createdAt:
                                    type: string
                                    format: date-time
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                  updatedAt:
                                    type: string
                                    format: date-time
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                required:
                                  - id
                                  - connectorId
                                  - status
                                  - statusDetail
                                  - errorCode
                                  - type
                                  - maxPower
                                  - evseId
                                  - createdAt
                                  - updatedAt
                          required:
                            - id
                            - evseId
                            - chargingStationId
                            - createdAt
                            - updatedAt
                            - connectors
                      group:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: number
                              name:
                                type: string
                              description:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              organizationId:
                                type: number
                              createdAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              updatedAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            required:
                              - id
                              - name
                              - description
                              - organizationId
                              - createdAt
                              - updatedAt
                          - type: 'null'
                      online:
                        type: boolean
                    required:
                      - id
                      - identifier
                      - name
                      - protocol
                      - latitude
                      - longitude
                      - address
                      - placeId
                      - vendorName
                      - model
                      - serialNumber
                      - firmwareVersion
                      - lastBootAt
                      - lastSeenAt
                      - lastConnectedAt
                      - lastDisconnectedAt
                      - organizationId
                      - groupId
                      - createdAt
                      - updatedAt
                      - evses
                      - group
                      - online
                required:
                  - chargingStation
        '404':
          description: Charging station group not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    const: 404
                  message:
                    type: string
                    const: Charging station group not found
                  type:
                    type: string
                    const: CHARGING_STATION_GROUP_NOT_FOUND
                  attributes:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                required:
                  - status
                  - message
                  - type
        '409':
          description: A charging station with this identifier already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    const: 409
                  message:
                    type: string
                    const: A charging station with this identifier already exists
                  type:
                    type: string
                    const: CHARGING_STATION_IDENTIFIER_TAKEN
                  attributes:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                required:
                  - status
                  - message
                  - type

````