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

# Profile consent preference

> Used to get consent preferences information for a specific user profile.

<br>
This endpoint returns consent preference status for user profiles for projects where <a href="https://docs.xtremepush.com/docs/consent-management">Consent Manager</a> has been enabled.

Data returned includes details of the channel, type of preference status and any relevant consent-specific data, for example, channel (channel type). The response also includes an integer-boolean status (`1` means the profile is currently subscribed to that channel and `0` is not.)

## OpenAPI

````json POST /list/consent-preference-profile
{
  "openapi": "3.1.0",
  "info": {
    "title": "external-api",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.eu.xtremepush.com/api/external"
    }
  ],
  "paths": {
    "/list/consent-preference-profile": {
      "post": {
        "summary": "Profile consent preference",
        "description": "Used to get consent preferences information for a specific user profile.\n\n<br>\nThis endpoint returns consent preference status for user profiles for projects where <a href=\"https://docs.xtremepush.com/docs/consent-management\">Consent Manager</a> has been enabled.\n\nData returned includes details of the channel, type of preference status and any relevant consent-specific data, for example, channel (channel type). The response also includes an integer-boolean status (`1` means the profile is currently subscribed to that channel and `0` is not.)",
        "operationId": "user-profile-consent-preference",
        "deprecated": "false",
        "requestBody": {
          "required": "true",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apptoken"
                ],
                "properties": {
                  "apptoken": {
                    "type": "string",
                    "description": "Your app token"
                  },
                  "order": {
                    "type": "array",
                    "description": "Order the results in either ascending or descending order based on any of the params, eg. `[\"name\"]` or `[\"update_time DESC\"]`",
                    "items": {
                      "type": "string"
                    }
                  },
                  "select": {
                    "type": "array",
                    "description": "Select what attributes to return, eg. `[\"name\", \"profile_id\", \"update_time\"]`",
                    "items": {
                      "type": "string"
                    }
                  },
                  "condition": {
                    "type": "string",
                    "format": "json",
                    "description": "Filter the user profiles based on some criteria, eg. `[ [\"user_id\", \"=\", \"USER_ID\"] ,[\"status\", \"=\", 0], [\"update_time\", \">\", \"1717229073\"]`"
                  },
                  "limit": {
                    "type": "integer",
                    "format": "int32",
                    "description": "Used with *offset* for pagination, eg. `\"limit\": 50, \"offset\": 0` returns a max of 50 results starting at position 0"
                  },
                  "offset": {
                    "type": "integer",
                    "format": "int32",
                    "description": "Used with *limit* for pagination"
                  }
                }
              },
              "examples": {
                "Get consent preferences for a single user": {
                  "value": {
                    "apptoken": "YOUR_APPTOKEN",
                    "condition": [
                      [
                        "user_id",
                        "=",
                        "USER_ID"
                      ]
                    ]
                  },
                  "summary": "Get all consent preferences for a single user profile"
                },
                "Get subscribed preferences updated after a timestamp": {
                  "value": {
                    "apptoken": "YOUR_APPTOKEN",
                    "condition": [
                      [
                        "status",
                        "=",
                        "1"
                      ],
                      [
                        "update_time",
                        ">",
                        "1717229073"
                      ]
                    ]
                  },
                  "summary": "Get all consent preferences for all user profiles which have status subscribed and have been updated after a specific point in time (timestamp must be provided in Unix)"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": "true",
                      "default": "true"
                    },
                    "code": {
                      "type": "integer",
                      "example": "200",
                      "default": "0"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "profile_id": {
                            "type": "string",
                            "example": "11ebb2fd3ffc345a9fac061f43cf49c0"
                          },
                          "name": {
                            "type": "string",
                            "example": "GROUP_MARKETING_mortgage_info"
                          },
                          "type": {
                            "type": "string",
                            "example": "0"
                          },
                          "type_name": {
                            "type": "string",
                            "example": "Marketing"
                          },
                          "channel": {
                            "type": "string",
                            "example": "push"
                          },
                          "status": {
                            "type": "integer",
                            "example": "1",
                            "default": "0"
                          },
                          "update_time": {
                            "type": "integer",
                            "example": "1725025235",
                            "default": "0"
                          },
                          "source": {
                            "type": "string",
                            "example": "manual"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "success": "true",
                      "code": "200",
                      "data": [
                        {
                          "profile_id": "11ebb2fd3ffc345a9fac061f43cf49c0",
                          "name": "GROUP_MARKETING_mortgage_info",
                          "type": "0",
                          "type_name": "Marketing",
                          "channel": "push",
                          "status": "1",
                          "update_time": "1725025235",
                          "source": "manual"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": "false",
                      "default": "true"
                    },
                    "code": {
                      "type": "integer",
                      "example": "400",
                      "default": "0"
                    },
                    "message": {
                      "type": "string",
                      "example": "apptoken is invalid."
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "success": "false",
                      "code": "400",
                      "message": "apptoken is invalid."
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "User Profile Methods"
        ]
      }
    }
  }
}
````

