---
title: "Create a new Consumer"
url: "https://nov18-dev.movespot.fyi/apis/konnect-runtime-groups-configuration-0/versions/af18902c-58f1-49d7-8ec2-9987b4e0d1bd/operations/create-consumer"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-runtime-groups-configuration-0/versions/af18902c-58f1-49d7-8ec2-9987b4e0d1bd.md

# Create a new Consumer

`POST` `/runtime-groups/{runtimeGroupId}/core-entities/consumers`

Operation ID: `create-consumer`

Create a new Consumer

## Path parameters

- `runtimeGroupId` (string, required) - The ID of your runtime group. This variable is available in the Konnect manager

## Request body

Content types: `application/json`

## Responses

- `200` - New consumer created response
- `400` - Invalid Consumer

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Runtime Groups Configuration
  version: 0.0.1
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /runtime-groups/{runtimeGroupId}/core-entities/consumers:
    parameters:
      - $ref: "#/components/parameters/runtimeGroupId"
    post:
      operationId: create-consumer
      summary: Create a new Consumer
      description: Create a new Consumer
      requestBody:
        $ref: "#/components/requestBodies/consumer-request"
      responses:
        "200":
          $ref: "#/components/responses/consumer-create-response"
        "400":
          description: Invalid Consumer
          content:
            application/json:
              schema:
                type: object
      tags:
        - Consumers
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    runtimeGroupId:
      name: runtimeGroupId
      in: path
      required: true
      schema:
        type: string
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The ID of your runtime group. This variable is available in the
        Konnect manager
  requestBodies:
    consumer-request:
      content:
        application/json:
          schema:
            type: object
            properties:
              username:
                description: >
                  The unique username of the Consumer. You must send either this
                  field or custom_id with the request.
                type: string
              custom_id:
                description: >
                  Field for storing an existing unique ID for the Consumer -
                  useful for mapping Kong with users in your existing database.
                  You must send either this field or username with the request.
                type: string
              tags:
                description: >
                  An optional set of strings associated with the Consumer for
                  grouping and filtering.
                type: array
                items:
                  type: string
            required:
              - username
              - custom_id
            x-examples:
              Example 1:
                id: ec1a1f6f-2aa4-4e58-93ff-b56368f19b27
                created_at: 1422386534
                username: my-username
                custom_id: my-custom-id
                tags:
                  - user-level
                  - low-priority
      description: Consumer request body
  responses:
    consumer-create-response:
      description: New consumer created response
      content:
        application/json:
          schema:
            type: object
            properties:
              created_at:
                description: |
                  Unix epoch when the resource was created.
                type: integer
                example: 1684424758
              custom_id:
                description: Field for the unique consumer ID
                type: string
              id:
                description: The unique id of the consumer.
                type: string
                example: c1a1f6f-2aa4-4e58-93ff-b56368f19b27
              tags:
                description: An optional set of strings associated with the Consumer for
                  grouping and filtering.
                type: array
                items:
                  type: string
              updated_at:
                description: |
                  Unix epoch when the resource was updated.
                type: integer
                example: 1684424758
              username:
                description: The unique username of the consumer.
                type: string
            x-examples:
              Example 1:
                id: ec1a1f6f-2aa4-4e58-93ff-b56368f19b27
                created_at: 1422386534
                username: my-username
                custom_id: my-custom-id
                tags:
                  - user-level
                  - low-priority
          examples:
            Example 1:
              value:
                created_at: 1684424758
                custom_id: string
                id: c1a1f6f-2aa4-4e58-93ff-b56368f19b27
                tags:
                  - string
                updated_at: 1684424758
                username: string
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: >-
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI to

        authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
