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

# Create line with id

> Idempotent creation: the id is the caller's, so a retry replays instead of creating a second line. A new id answers 202 and opens the provisioning order; an id that already names a line with the same msisdn and holderId answers 200 with that line and opens nothing; an id taken by a different line answers 409. paymentTransactionId names the Payments transaction that already paid for the line (its first invoice is born paid); paymentMethodId becomes the line's default method. Neither is persisted on the line.



## OpenAPI

````yaml PUT /lines/{id}
openapi: 3.1.0
info:
  title: Wave Lines API
  version: 1.0.0
servers: []
security:
  - apiKey: []
tags:
  - name: lines
    description: Line lifecycle operations
  - name: payments
    description: Payment listing and lookup
  - name: payment-methods
    description: Payment method lifecycle operations
  - name: tax-receipts
    description: Tax receipt listing, lookup and document download
  - name: subscriptions
    description: Subscription lookup, product management and invoices
  - name: holders
    description: Holder (customer) listing, lookup and creation
  - name: usage
    description: 'Usage: per-product line balance and consumption'
  - name: Portability
    description: >-
      Number portability: port-in request creation, listing, modification and
      cancellation, plus the consolidated portability status
  - name: Inventory
    description: >-
      Inventory resource pools: pool listing, the resources held in a pool and
      resource reservations
  - name: Catalog
    description: Catalog offers exposed by the Wave Catalog API
  - name: orders
    description: Order listing and lookup, proxied from the Order API
paths:
  /lines/{id}:
    put:
      tags:
        - lines
      summary: Create a line under a caller-chosen id
      description: >-
        Idempotent creation: the id is the caller's, so a retry replays instead
        of creating a second line. A new id answers 202 and opens the
        provisioning order; an id that already names a line with the same msisdn
        and holderId answers 200 with that line and opens nothing; an id taken
        by a different line answers 409. paymentTransactionId names the Payments
        transaction that already paid for the line (its first invoice is born
        paid); paymentMethodId becomes the line's default method. Neither is
        persisted on the line.
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
            minLength: 1
          in: header
          name: x-broker-id
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                msisdn:
                  type: string
                  pattern: ^[1-9]\d{10,14}$
                simCardType:
                  type: string
                  enum:
                    - ESIM
                    - PHYSICAL
                iccId:
                  anyOf:
                    - type: string
                      pattern: ^\d{19,20}$
                    - type: 'null'
                  default: null
                imsi:
                  anyOf:
                    - type: string
                      pattern: ^\d{14,15}$
                    - type: 'null'
                  default: null
                holderId:
                  type: string
                  minLength: 1
                paymentTransactionId:
                  type: string
                  format: uuid
                paymentMethodId:
                  type: string
                  format: uuid
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      offerVersionId:
                        type: string
                        format: uuid
                      grantedDiscountIds:
                        type: array
                        items:
                          type: string
                          format: uuid
                        maxItems: 20
                      couponCode:
                        type: string
                        minLength: 1
                    required:
                      - offerVersionId
                    additionalProperties: false
                  minItems: 1
                externalCode:
                  type:
                    - string
                    - 'null'
                  default: null
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                  default: {}
                portedMsisdn:
                  type: string
                  pattern: ^[1-9]\d{10,14}$
              required:
                - msisdn
                - simCardType
                - holderId
                - products
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - PROVISIONING
                      - PROVISIONING_ERROR
                      - STAND_BY
                      - ACTIVATING
                      - ACTIVATION_ERROR
                      - ACTIVE
                      - BLOCKING
                      - BLOCKING_ERROR
                      - BLOCKED
                      - UNBLOCKING
                      - UNBLOCKING_ERROR
                      - TERMINATING
                      - TERMINATION_ERROR
                      - TERMINATED
                  msisdn:
                    type: string
                  simCardType:
                    type: string
                    enum:
                      - ESIM
                      - PHYSICAL
                  simCard:
                    anyOf:
                      - type: object
                        properties:
                          iccId:
                            type: string
                          imsi:
                            type:
                              - string
                              - 'null'
                        required:
                          - iccId
                          - imsi
                        additionalProperties: false
                      - type: 'null'
                  holder:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      federalTaxId:
                        type: string
                    required:
                      - id
                      - name
                      - federalTaxId
                    additionalProperties: false
                  subscriptionId:
                    type:
                      - 'null'
                      - string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  activatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                  terminatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                  externalCode:
                    type:
                      - 'null'
                      - string
                  brokerId:
                    type:
                      - 'null'
                      - string
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - id
                  - status
                  - msisdn
                  - simCardType
                  - simCard
                  - holder
                  - subscriptionId
                  - createdAt
                  - updatedAt
                  - activatedAt
                  - terminatedAt
                  - externalCode
                  - brokerId
                  - metadata
                additionalProperties: false
        '202':
          description: >-
            The line was accepted for provisioning and is already readable at
            the Location URL.
          headers:
            Location:
              schema:
                type: string
                example: /lines/{id}
              description: URL of the newly created resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - PROVISIONING
                      - PROVISIONING_ERROR
                      - STAND_BY
                      - ACTIVATING
                      - ACTIVATION_ERROR
                      - ACTIVE
                      - BLOCKING
                      - BLOCKING_ERROR
                      - BLOCKED
                      - UNBLOCKING
                      - UNBLOCKING_ERROR
                      - TERMINATING
                      - TERMINATION_ERROR
                      - TERMINATED
                  msisdn:
                    type: string
                  simCardType:
                    type: string
                    enum:
                      - ESIM
                      - PHYSICAL
                  simCard:
                    anyOf:
                      - type: object
                        properties:
                          iccId:
                            type: string
                          imsi:
                            type:
                              - string
                              - 'null'
                        required:
                          - iccId
                          - imsi
                        additionalProperties: false
                      - type: 'null'
                  holder:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      federalTaxId:
                        type: string
                    required:
                      - id
                      - name
                      - federalTaxId
                    additionalProperties: false
                  subscriptionId:
                    type:
                      - 'null'
                      - string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  activatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                  terminatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                  externalCode:
                    type:
                      - 'null'
                      - string
                  brokerId:
                    type:
                      - 'null'
                      - string
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - id
                  - status
                  - msisdn
                  - simCardType
                  - simCard
                  - holder
                  - subscriptionId
                  - createdAt
                  - updatedAt
                  - activatedAt
                  - terminatedAt
                  - externalCode
                  - brokerId
                  - metadata
                additionalProperties: false
        '400':
          description: Error response as an RFC 9457 problem detail.
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 problem details error response.
                required:
                  - type
                  - title
                  - status
                additionalProperties: true
                properties:
                  type:
                    type: string
                    description: A URI reference that identifies the problem type.
                    enum:
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/validation-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/unauthorized
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/forbidden
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-found
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/conflict
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-status-transition
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/internal-server-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-acceptable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/service-unavailable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/portability-rejected
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-iccid
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-imsi
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-subscription
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/workflow-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-broker-id
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-sim-card
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/holder-not-found
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: The HTTP status code.
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  instance:
                    type: string
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem.
        '401':
          description: Error response as an RFC 9457 problem detail.
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 problem details error response.
                required:
                  - type
                  - title
                  - status
                additionalProperties: true
                properties:
                  type:
                    type: string
                    description: A URI reference that identifies the problem type.
                    enum:
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/validation-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/unauthorized
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/forbidden
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-found
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/conflict
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-status-transition
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/internal-server-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-acceptable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/service-unavailable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/portability-rejected
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-iccid
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-imsi
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-subscription
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/workflow-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-broker-id
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-sim-card
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/holder-not-found
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: The HTTP status code.
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  instance:
                    type: string
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem.
        '404':
          description: Error response as an RFC 9457 problem detail.
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 problem details error response.
                required:
                  - type
                  - title
                  - status
                additionalProperties: true
                properties:
                  type:
                    type: string
                    description: A URI reference that identifies the problem type.
                    enum:
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/validation-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/unauthorized
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/forbidden
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-found
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/conflict
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-status-transition
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/internal-server-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-acceptable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/service-unavailable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/portability-rejected
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-iccid
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-imsi
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-subscription
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/workflow-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-broker-id
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-sim-card
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/holder-not-found
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: The HTTP status code.
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  instance:
                    type: string
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem.
        '409':
          description: Error response as an RFC 9457 problem detail.
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 problem details error response.
                required:
                  - type
                  - title
                  - status
                additionalProperties: true
                properties:
                  type:
                    type: string
                    description: A URI reference that identifies the problem type.
                    enum:
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/validation-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/unauthorized
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/forbidden
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-found
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/conflict
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-status-transition
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/internal-server-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-acceptable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/service-unavailable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/portability-rejected
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-iccid
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-imsi
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-subscription
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/workflow-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-broker-id
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-sim-card
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/holder-not-found
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: The HTTP status code.
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  instance:
                    type: string
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem.
        '422':
          description: Error response as an RFC 9457 problem detail.
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 problem details error response.
                required:
                  - type
                  - title
                  - status
                additionalProperties: true
                properties:
                  type:
                    type: string
                    description: A URI reference that identifies the problem type.
                    enum:
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/validation-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/unauthorized
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/forbidden
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-found
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/conflict
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-status-transition
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/internal-server-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-acceptable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/service-unavailable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/portability-rejected
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-iccid
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-imsi
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-subscription
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/workflow-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-broker-id
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-sim-card
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/holder-not-found
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: The HTTP status code.
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  instance:
                    type: string
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem.
        '500':
          description: Error response as an RFC 9457 problem detail.
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 problem details error response.
                required:
                  - type
                  - title
                  - status
                additionalProperties: true
                properties:
                  type:
                    type: string
                    description: A URI reference that identifies the problem type.
                    enum:
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/validation-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/unauthorized
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/forbidden
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-found
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/conflict
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-status-transition
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/internal-server-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/not-acceptable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/service-unavailable
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/portability-rejected
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-iccid
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-imsi
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/missing-subscription
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/workflow-error
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-broker-id
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/invalid-sim-card
                      - >-
                        https://docs.bemobiwave.com/api-reference/errors/holder-not-found
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: The HTTP status code.
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  instance:
                    type: string
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem.
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.