---
updatedAt: 2024-11-18T16:17:51.000Z
agentTools:
  projectIndex: https://docs-cpm.dataguard.com/llms.txt
---

# Submit a citizen preference

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "servers": [
    {
      "url": "api.consentric.io"
    }
  ],
  "info": {
    "version": "1.0",
    "title": "Preferences",
    "license": {
      "name": "(c) 2025 DataGuard. All Rights Reserved."
    }
  },
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "header"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "api_key": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/preferences/submissions": {
      "post": {
        "summary": "Submit a citizen preference",
        "operationId": "createPreference",
        "tags": [
          "Preference Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "readOnly": true
                    },
                    "applicationId": {
                      "type": "string",
                      "example": "d8BNrPqsgRZ"
                    },
                    "citizenId": {
                      "type": "string"
                    },
                    "recordedAt": {
                      "type": "string",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "recordedBy": {
                      "type": "string",
                      "readOnly": true
                    },
                    "recordedByName": {
                      "type": "string",
                      "readOnly": true
                    },
                    "recordedClient": {
                      "type": "string",
                      "readOnly": true
                    },
                    "recordedClientName": {
                      "type": "string",
                      "readOnly": true
                    },
                    "preferences": {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "type": "object",
                        "properties": {
                          "reference": {
                            "type": "string"
                          },
                          "choices": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                              "type": "string",
                              "description": "choice reference",
                              "example": "interests_jazz"
                            }
                          }
                        },
                        "required": [
                          "reference",
                          "choices"
                        ]
                      }
                    },
                    "locale": {
                      "type": "string",
                      "example": "fr",
                      "maxLength": 35
                    }
                  },
                  "required": [
                    "applicationId",
                    "preferences"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Unauthorised"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "readOnly": true
                  },
                  "applicationId": {
                    "type": "string",
                    "example": "d8BNrPqsgRZ"
                  },
                  "citizenId": {
                    "type": "string",
                    "example": "XuW7vsxuQK3"
                  },
                  "externalRef": {
                    "type": "string",
                    "example": "jb-mld-05"
                  },
                  "recordedAt": {
                    "type": "string",
                    "format": "date-time",
                    "readOnly": true
                  },
                  "recordedBy": {
                    "type": "string",
                    "readOnly": true
                  },
                  "recordedByName": {
                    "type": "string",
                    "readOnly": true
                  },
                  "recordedClient": {
                    "type": "string",
                    "readOnly": true
                  },
                  "recordedClientName": {
                    "type": "string",
                    "readOnly": true
                  },
                  "preferences": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string",
                          "example": "interests"
                        },
                        "choices": {
                          "type": "array",
                          "minItems": 1,
                          "items": {
                            "type": "string",
                            "description": "choice reference",
                            "example": "interests_jazz"
                          }
                        }
                      },
                      "required": [
                        "reference",
                        "choices"
                      ]
                    }
                  },
                  "locale": {
                    "type": "string",
                    "example": "fr",
                    "maxLength": 35
                  }
                },
                "required": [
                  "applicationId",
                  "preferences"
                ]
              }
            }
          },
          "required": true
        }
      }
    }
  }
}
```