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

# Create a series

> Create a new series idempotently with the given UUID (any version).

<ResponseExample>
  ```json Example theme={"system"}
  {
      "last_index": 1000
      "padding": 5
      "prefix": "TEST1"
      "name": "Testing"
      "created_at": "2022-03-03T22:18:50Z"
      "suffix": "-2022"
      "updated_at": "2022-03-03T22:18:50Z"
      "id": "835bb1ca-e7c4-41e6-9e88-464de54cc08e"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml PUT /sequence/v1/series/{id}
openapi: 3.0.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    The Invopop Sequence Service API allows you to define a "series" whose
    entries are guaranteed to be sequential.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Sequence Service API
  version: 1.0.3
servers:
  - description: production
    url: https://api.invopop.com
security:
  - authToken: []
paths:
  /sequence/v1/series/{id}:
    put:
      description: Create a new series idempotently with the given UUID (any version).
      parameters:
        - description: The UUID (any version) of the series to create.
          in: path
          name: id
          required: true
          schema:
            description: The UUID (any version) of the series to create.
            example: a8904315-3d16-4a95-91c1-30d6cdde553e
            title: ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SequenceCreateSeries'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SequenceSeries'
          description: OK
components:
  schemas:
    SequenceCreateSeries:
      properties:
        code:
          description: A code that can be used to identify the series.
          example: SALES-2020
          title: Code
          type: string
        description:
          description: A description of the series.
          example: This series is used for sales.
          title: Description
          type: string
        name:
          description: The name of the series.
          example: My Series
          title: Name
          type: string
        padding:
          description: The number of 0s to pad the generated codes with.
          example: 5
          title: Padding
          type: integer
        prefix:
          description: A prefix that will be prepended to all entries.
          example: INV-
          title: Prefix
          type: string
        sig:
          description: JSON Web Signature of the key properties used to create the series.
          title: Signature
          type: string
        start:
          description: The starting index for the series.
          example: 1
          title: Start
          type: integer
        suffix:
          description: A suffix that will be appended to all entries.
          example: '-F1'
          title: Suffix
          type: string
      type: object
    SequenceSeries:
      properties:
        code:
          description: A code that can be used to identify the series.
          example: SALES-2020
          title: Code
          type: string
        created_at:
          description: The date and time the series was created.
          example: '2020-10-01T00:00:00Z'
          title: Created At
          type: string
        description:
          description: A description of the series.
          example: This series is used for sales.
          title: Description
          type: string
        id:
          description: The UUID (any version) of the series.
          example: a8904315-3d16-4a95-91c1-30d6cdde553e
          title: ID
          type: string
        last_entry_id:
          description: The ID of the last entry in the series.
          example: a8904315-3d16-4a95-91c1-30d6cdde553e
          title: Last Entry ID
          type: string
        last_index:
          description: The last index used in the series.
          example: 100
          title: Last Index
          type: integer
        name:
          description: The name of the series.
          example: My Series
          title: Name
          type: string
        padding:
          description: The number of 0s to pad the generated codes with.
          example: 5
          title: Padding
          type: integer
        prefix:
          description: A prefix that will be prepended to all entries.
          example: INV-
          title: Prefix
          type: string
        suffix:
          description: A suffix that will be appended to all entries.
          example: '-F1'
          title: Suffix
          type: string
        updated_at:
          description: The date and time the series was last updated.
          example: '2020-10-01T00:00:00Z'
          title: Updated At
          type: string
      type: object
  securitySchemes:
    authToken:
      bearerFormat: JWT
      description: >-
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.
        Example: `Authorization: Bearer <token>`
      scheme: bearer
      type: http

````