---
openapi: 3.0.3
info:
  title: Braze REST API – List SDK Authentication keys
  description: |
    ## Prerequisites

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

    ## Rate limit

    This endpoint has a rate limit of 100 requests per day per workspace, shared between all SDK Authentication endpoints and `GET /app_group/apps`. Requests count toward the limit even when they fail validation. For more information, see [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: []
paths:
  "/app_group/sdk_authentication/keys":
    get:
      summary: List SDK Authentication keys
      operationId: get_app_group_sdk_authentication_keys_get_sdk_authentication_keys
      description: |
        ## Validation rules

        This endpoint has the following validation rules:

        - The `app_id` parameter must be a valid app API identifier.
        - The app must exist in your workspace.
      parameters:
        - name: app_id
          in: query
          required: true
          description: The app API identifier.
          schema:
            type: string
          example: 01234567-89ab-cdef-0123-456789abcdef
      responses:
        "200":
          description: |
            The request succeeded and the response body lists the SDK Authentication keys. No action needed.

            The following sample response shows an example of the response returned when you list SDK Authentication keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SdkAuthenticationKeysResponse'
              examples:
                success:
                  summary: SDK Authentication keys
                  value:
                    keys:
                      - id: 65a1f0c2e4b0a1b2c3d4e5f6
                        rsa_public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvvD+fgA0YuCUd/v35htn...\n-----END PUBLIC KEY-----"
                        description: SDK Authentication Key for iOS App
                        is_primary: true
                      - id: 65a1f0c2e4b0a1b2c3d4e5f7
                        rsa_public_key: "-----BEGIN PUBLIC KEY-----\nqWGfHOAiIwVzC/bTxwQZQQVzm/3ktgdNXRUDm5aIwVzCtxbNm5aIxOAiIwVzVHOA...\n-----END PUBLIC KEY-----"
                        description: SDK Authentication Key for Android App
                        is_primary: false
        "400":
          description: Bad request. The `app_id` is missing or isn't a valid app API identifier for this workspace. Pass a valid `app_id` from the [API Keys page]({{site.baseurl}}/user_guide/administer/global/workspace_settings/apis_and_identifiers/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_app_id:
                  summary: Missing or invalid app_id
                  value:
                    message: 'Missing or invalid required parameter: app_id'
        "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:
                    message: 'Invalid API key: YOUR_REST_API_KEY'
        "403":
          description: Access denied. The REST API key doesn't have the required permission. Use a REST API key that has the `sdk_authentication.keys` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Missing permission
                  value:
                    message: Access Denied
        "429":
          description: |
            Rate limited. You exceeded the limit of 100 requests per day shared between the SDK Authentication endpoints and `GET /app_group/apps`. Wait for the limit to reset before retrying. See [API rate limits]({{site.baseurl}}/api/api_limits/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                rate_limited:
                  summary: Daily rate limit exceeded
                  value:
                    message: You have exceeded your limit of 100 requests per day. Please contact your account executive to increase your limit. If you do not have their info, you may contact Braze directly at https://www.braze.com/contact/.
        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 `sdk_authentication.keys` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    SdkAuthenticationKey:
      title: SDK Authentication key
      type: object
      properties:
        id:
          type: string
          description: The ID of the SDK Authentication key, a 24-character hexadecimal string.
          example: 65a1f0c2e4b0a1b2c3d4e5f6
        rsa_public_key:
          type: string
          description: The RSA public key string.
          example: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvvD+fgA0YuCUd/v35htn...\n-----END PUBLIC KEY-----"
        description:
          type: string
          nullable: true
          description: Description of the SDK Authentication key. Keys created in the dashboard can have no description, in which case this is `null`.
          example: SDK Authentication Key for iOS App
        is_primary:
          type: boolean
          description: Whether this key is the primary SDK Authentication key.
          example: true
    SdkAuthenticationKeysResponse:
      title: List SDK Authentication keys response
      type: object
      properties:
        keys:
          type: array
          description: Array of SDK Authentication key objects.
          items:
            $ref: '#/components/schemas/SdkAuthenticationKey'
        message:
          type: string
          example: success
    ErrorResponse:
      title: Error
      type: object
      properties:
        message:
          type: string
          description: The error message describing why the request failed.
