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

# Revoke badge from account

> This endpoint allows you to revoke a badge from an account



## OpenAPI

````yaml /api-reference/openapi.documented.json post /api/loyalty/badges/{id}/revoke
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/loyalty/badges/{id}/revoke:
    post:
      tags:
        - Badge
      summary: Revoke badge from account
      description: This endpoint allows you to revoke a badge from an account
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Badge ID
            example: 123e4567-e89b-12d3-a456-426614174333
          description: UUID of the badge (converted to lowercase)
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                  format: uuid
                  title: User ID
                  description: UUID of the user (converted to lowercase)
                  example: 123e4567-e89b-12d3-a456-426614174333
                walletAddress:
                  type: string
                  title: Wallet Address
                  description: Validated and formatted wallet address
                  example: '0x1234567890abcdef1234567890abcdef12345678'
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                    - revoked
                  title: Status
                  description: Status of the badge
                  example: revoked
              title: Update User Badge Schema
              description: Schema for a update user badge schema
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: The message returned upon update of the badge
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      userId:
                        type: string
                        format: uuid
                      loyaltyBadgeId:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - active
                          - inactive
                          - revoked
                    required:
                      - id
                      - userId
                      - loyaltyBadgeId
                      - status
                required:
                  - message
                  - data
                title: Update User Badge Success Response
                description: Response returned upon successful update of the user badge
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Not found
                required:
                  - message
                title: Not Found Response
                description: Schema for not found response
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    title: Success
                    description: Indicates operation success
                    example: false
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Internal server error
                  debugInfo:
                    type: string
                    title: Debug Info
                    description: Optional debug information
                    example: Stack trace or additional error details
                required:
                  - success
                  - message
                title: Internal Server Error Response
                description: Schema for internal server error response
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````