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

# Create Dsar Request

> ### Create Data Subject Access Request

Initiates a new Data Subject Access Request (DSAR). A verification token is
generated and should be sent to the customer via email for identity verification.
The request includes a 30-day response deadline per GDPR Article 12.

**Request Body**:
- `customerId`: UUID of the customer requesting access
- `requestType`: Type of request (access, deletion, portability, rectification)
- `requestedBy`: Email address of the person making the request

**Returns**:
- 201 Created with the DSAR request details including deadline.



## OpenAPI

````yaml https://api.loyalty.dog/openapi.json post /v2/dsar/requests
openapi: 3.1.0
info:
  title: LoyaltyDog
  description: >-

    Welcome to the LoyaltyDog API! This API provides access to our loyalty
    program features, allowing you to integrate with various platforms and
    manage your loyalty data.


    Want to query LoyaltyDog via an AI assistant (Claude, Cursor, Windsurf)? See
    the [MCP Integration guide](https://loyaltydog.ai/playground#mcp).
        
  termsOfService: https://loyalty.dog/loyalty-program-terms-service
  contact:
    name: LoyaltyDog Support
    url: https://loyalty.dog/contact-us
    email: support@loyalty.dog
  version: 1.0.1
servers:
  - url: https://api.loyalty.dog
    description: Production
security:
  - bearerAuth: []
paths:
  /v2/dsar/requests:
    post:
      tags:
        - GDPR
      summary: Create Dsar Request
      description: >-
        ### Create Data Subject Access Request


        Initiates a new Data Subject Access Request (DSAR). A verification token
        is

        generated and should be sent to the customer via email for identity
        verification.

        The request includes a 30-day response deadline per GDPR Article 12.


        **Request Body**:

        - `customerId`: UUID of the customer requesting access

        - `requestType`: Type of request (access, deletion, portability,
        rectification)

        - `requestedBy`: Email address of the person making the request


        **Returns**:

        - 201 Created with the DSAR request details including deadline.
      operationId: create_dsar_request_v2_dsar_requests_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDSARRequestPayload'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DSARRequestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateDSARRequestPayload:
      properties:
        customerId:
          $ref: '#/components/schemas/PydanticObjectId'
        requestType:
          $ref: '#/components/schemas/DSARRequestType'
          default: access
        requestedBy:
          type: string
          title: Requestedby
      type: object
      required:
        - customerId
        - requestedBy
      title: CreateDSARRequestPayload
      description: Payload for creating a new DSAR request.
    DSARRequestResponse:
      properties:
        id:
          type: string
          title: Id
        status:
          $ref: '#/components/schemas/DSARRequestStatus'
        deadline:
          type: string
          format: date-time
          title: Deadline
        createdAt:
          type: string
          format: date-time
          title: Createdat
      type: object
      required:
        - id
        - status
        - deadline
        - createdAt
      title: DSARRequestResponse
      description: Response containing DSAR request details.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    DSARRequestType:
      type: string
      enum:
        - access
        - deletion
        - portability
        - rectification
      title: DSARRequestType
      description: Type of Data Subject Access Request.
    DSARRequestStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
        - denied
      title: DSARRequestStatus
      description: Status of DSAR request processing.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from POST /v2/token.

````