---
title: "Create badges"
method: POST
path: "/api_gateway/v1/badges/badgeMeta"
---

# Create badges

`POST /api_gateway/v1/badges/badgeMeta`

## Headers

- `X-CAP-BADGES-MIGRATION:` string

## Request body

- object
  - `RAW_BODY` string, json — { "name": "Furry Friend Badge", "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher", "startOn": 1699596721, "expiresOn": 1828754110, "earnedBadgeExpiry": { "expiryType": "RELATIVE", "relativeExpirytype": "MONTHS", "value": 3 }, "ownership": { "restrictedToOwners": [ "Loyalty" ] }, "customerConstraints": [ { "constraintType": "CUSTOMER_BADGE_FIXED_VALUE", "maxEarnLimit": 1 } ], "badgeConstraints": [ { "constraintType": "BADGE_FIXED_VALUE", "maxEarnLimit": 1000 } ], "earnType": "EARN", "benefits": [ { "benefitType": "COUPON", "seriesId": 13686 }, { "benefitType": "LOYALTY_POINTS", "points": 100, "programId": 626, "promotionId": 80332, "allocationStrategyId": 1489, "expirationStrategyId": 3843 } ], "tags": [ { "name": "Type", "value": "Birthday" } ] }

## Response `201`

201

- union
  - object
    - `data` object
      - `id` string
      - `orgId` integer
      - `name` string
      - `description` string
      - `startOn` integer
      - `expiresOn` integer
      - `earnedBadgeExpiry` object
        - `expiryType` string
        - `type` string
        - `expiresOn` unknown
        - `expireWithBadgeMeta` boolean
      - `issuedBadgeExpiry` unknown
      - `images` unknown[]
        - unknown
      - `ownership` object
        - `restrictedToOwners` string[]
        - `claims` unknown[]
          - unknown
      - `customerConstraints` object[]
        - `constraintType` string
        - `referenceId` string
        - `durationType` string
        - `refreshRate` integer
        - `maxEarnLimit` integer
        - `cycleStatus` string
        - `startDate` integer
        - `endDate` integer
      - `badgeConstraints` object[]
        - `constraintType` string
        - `referenceId` string
        - `durationType` string
        - `refreshRate` integer
        - `maxEarnLimit` integer
        - `startDate` integer
        - `endDate` integer
        - `cycleStatus` string
      - `benefits` object[]
        - `benefitType` string
        - `seriesId` integer
      - `badgeGroupId` unknown
      - `badgeRank` integer
      - `earnType` string
      - `status` string
      - `createdOn` number
      - `createdBy` integer
      - `lastUpdatedOn` number
      - `lastUpdatedBy` integer
      - `customFields` object
      - `active` boolean
    - `errors` unknown[]
      - unknown
    - `warnings` unknown[]
      - unknown
  - object
    - `data` object
      - `id` string
      - `orgId` integer
      - `name` string
      - `description` string
      - `startOn` integer
      - `expiresOn` integer
      - `earnedBadgeExpiry` object
        - `expiryType` string
        - `relativeExpirytype` string
        - `value` integer
      - `issuedBadgeExpiry` object
        - `expiryType` string
        - `type` string
        - `expiresOn` integer
        - `expireWithBadgeMeta` boolean
      - `images` object[]
        - `name` string
        - `fileSvcHandle` string
        - `url` string
        - `tag` string
      - `ownership` object
        - `restrictedToOwners` string[]
        - `claims` unknown[]
          - unknown
      - `customerConstraints` object[]
        - `constraintType` string
        - `referenceId` string
        - `durationType` string
        - `refreshRate` integer
        - `maxEarnLimit` integer
        - `cycleStatus` string
        - `startDate` integer
        - `endDate` integer
      - `badgeConstraints` object[]
        - `constraintType` string
        - `maxEarnLimit` integer
      - `benefits` object[]
        - `benefitType` string
        - `seriesId` integer
      - `badgeGroupId` unknown
      - `badgeRank` integer
      - `earnType` string
      - `status` string
      - `createdOn` number
      - `createdBy` integer
      - `lastUpdatedOn` number
      - `lastUpdatedBy` integer
      - `customFields` object
      - `active` boolean
    - `errors` unknown[]
      - unknown
    - `warnings` unknown[]
      - unknown

## Other responses

- `400` — 400
- `500` — 500

---

[API](https://skmtc.net/capillarytech/apis/sample-api.md) · [All operations](https://skmtc.net/capillarytech/apis/sample-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capillarytech/sample-api/revisions/de241f2ed9b3/schema)
