---
openapi: 3.0.3
info:
  title: Braze REST API – View details for preference center
  description: |
    ## Prerequisites

    To use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics#rest-api-key-permissions) with the `preference_center.get` permission.

    ## Rate limit

    This endpoint has a rate limit of 1,000 requests per minute, per workspace, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).
  version: 1.0.0
  contact:
    name: Braze Support
    url: https://www.braze.com/docs/braze_support/
  license:
    name: Braze Documentation
    url: https://www.braze.com/docs/api/home/
servers:
  - url: https://rest.iad-01.braze.com
    description: US-01
  - url: https://rest.iad-02.braze.com
    description: US-02
  - url: https://rest.iad-03.braze.com
    description: US-03
  - url: https://rest.iad-04.braze.com
    description: US-04
  - url: https://rest.iad-05.braze.com
    description: US-05
  - url: https://rest.iad-06.braze.com
    description: US-06
  - url: https://rest.iad-07.braze.com
    description: US-07
  - url: https://rest.iad-08.braze.com
    description: US-08
  - url: https://rest.us-10.braze.com
    description: US-10
  - url: https://rest.fra-01.braze.eu
    description: EU-01
  - url: https://rest.fra-02.braze.eu
    description: EU-02
  - url: https://rest.au-01.braze.com
    description: AU-01
  - url: https://rest.id-01.braze.com
    description: ID-01
  - url: https://rest.jp-01.braze.com
    description: JP-01
  - url: https://rest.kr-01.braze.com
    description: KR-01
security:
- BearerAuth: []
# cspell:ignore preferencecenterexternalid
paths:
  "/preference_center/v1/{preferenceCenterExternalID}":
    get:
      summary: View details for preference center
      description: There are no request parameters for this endpoint.
      operationId: get_preference_center_v1_preferencecenterexternalid_get_view_details_preference_center
      parameters:
        - name: preferenceCenterExternalID
          in: path
          required: true
          description: The ID for your preference center.
          schema:
            type: string
          example: preference_center_external_id
      responses:
        "200":
          description: The request succeeded and the response body includes the Preference Center details. No action needed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewDetailsPreferenceCenterResponse'
              examples:
                success:
                  summary: Preference center details
                  value:
                    name: My Preference Center
                    preference_center_api_id: preference_center_api_id
                    created_at: example_time_created
                    updated_at: example_time_updated
                    preference_center_title: Example preference center title
                    preference_center_page_html: HTML for preference center here
                    confirmation_page_html: HTML for confirmation page here
                    redirect_page_html: null
                    preference_center_options:
                      meta-viewport-content: width=device-width, initial-scale=2
                    state: active
        "400":
          description: |
            Bad request. The request is missing a required parameter or violates a constraint. Correct the request per the details in the error message (`400 Bad request. Details: …`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "401":
          description: |
            Unauthorized. The REST API key is missing, malformed, or sent to the wrong REST endpoint. Send the key as `Authorization: Bearer YOUR_REST_API_KEY` to the correct [REST endpoint]({{site.baseurl}}/api/basics/#endpoints). For more causes, see [Errors and responses]({{site.baseurl}}/api/errors/#fatal-errors).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_api_key:
                  summary: Invalid API key
                  value:
                    error: Error authenticating credentials
        "403":
          description: Access denied. The REST API key doesn't have the required permission. Use a REST API key that has the `preference_center.get` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Missing permission
                  value:
                    error: You do not have permission to access this resource
        "404":
          description: Not found. No Preference Center matches the `preference_center_api_id`. Pass a valid `preference_center_api_id` from the [List preference centers endpoint]({{site.baseurl}}/api/endpoints/preference_center/get_list_preference_center/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Preference center not found
                  value:
                    error: Preference center could not be found.
        "429":
          description: |
            Rate limited. You exceeded the rate limit for this endpoint. Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/). The error message says how many seconds to wait before you retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                over_rate_limit:
                  summary: Over rate limit
                  value:
                    error: 429 Try again in 30 seconds
        "500":
          description: |
            Internal server error. An unexpected error occurred on the Braze server. Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_server_error:
                  summary: Internal server error
                  value:
                    error: 500 Internal Server Error
        5XX:
          description: |
            Internal server error. An unexpected error occurred on the Braze server. Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
      description: |
        REST API keys are created in the Braze dashboard at **Settings → APIs and
        Identifiers → API Keys**. The key must include the `preference_center.get` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    LinkTag:
      title: Link tag
      type: object
      properties:
        rel:
          type: string
          enum: [icon, shortcut icon, apple-touch-icon]
        type:
          type: string
          enum: [image/png, image/svg, image/gif, image/x-icon, image/svg+xml, mask-icon]
        sizes:
          type: string
        color:
          type: string
        href:
          type: string
    PreferenceCenterOptions:
      title: Preference center options
      type: object
      properties:
        meta-viewport-content:
          type: string
          description: The `content` value of the page's `viewport` meta tag.
          example: width=device-width, initial-scale=2
        links-tags:
          type: array
          description: The `<link>` tags, such as a favicon, added to the page.
          items:
            $ref: '#/components/schemas/LinkTag'
    ViewDetailsPreferenceCenterResponse:
      title: View details for preference center response
      type: object
      properties:
        name:
          type: string
          description: The name of the preference center.
          example: My Preference Center
        preference_center_api_id:
          type: string
          description: The ID for your preference center.
          example: preference_center_api_id
        created_at:
          type: string
          description: When the preference center was created, in ISO 8601 format.
          example: example_time_created
        updated_at:
          type: string
          description: When the preference center was last updated, in ISO 8601 format.
          example: example_time_updated
        preference_center_title:
          type: string
          description: The title for the preference center and confirmation pages.
          example: Example preference center title
        preference_center_page_html:
          type: string
          description: The HTML for the preference center page.
          example: HTML for preference center here
        confirmation_page_html:
          type: string
          description: The HTML for the confirmation page.
          example: HTML for confirmation page here
        redirect_page_html:
          type: string
          nullable: true
          description: The HTML for the redirect page, or `null` if the preference center has none.
          example: null
        preference_center_options:
          $ref: '#/components/schemas/PreferenceCenterOptions'
        state:
          type: string
          enum: [active, draft]
          description: Whether the preference center is `active` or `draft`.
          example: active
    ErrorResponse:
      title: Error
      type: object
      properties:
        error:
          type: string
          description: The error message describing why the request failed.
