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

# Get Secrets (Paginated)

> Retrieve a paginated list of all system secrets stored in your vault

Retrieve a paginated list of all system secrets stored in your vault.

## Base URL

All API requests should be made to:

```
https://api.hookpulse.io
```

## Example request

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.hookpulse.io/v1/api/get_secrets_paginated/?page={{page}}" \
    -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
    -H "x-brand-uuid: {{x-brand-uuid}}"
  ```

  ```javascript JavaScript theme={null}
  const page = {{page}};
  const response = await fetch(`https://api.hookpulse.io/v1/api/get_secrets_paginated/?page=${page}`, {
    method: 'GET',
    headers: {
      'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
      'x-brand-uuid': '{{x-brand-uuid}}'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = 'https://api.hookpulse.io/v1/api/get_secrets_paginated/'
  headers = {
      'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
      'x-brand-uuid': '{{x-brand-uuid}}'
  }
  params = {
      'page': {{page}}
  }

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'json'
  require 'uri'

  uri = URI('https://api.hookpulse.io/v1/api/get_secrets_paginated/')
  uri.query = URI.encode_www_form({ page: {{page}} })
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Get.new(uri)
  request['x-hookpulse-api-key'] = '{{x-hookpulse-api-key}}'
  request['x-brand-uuid'] = '{{x-brand-uuid}}'

  response = http.request(request)
  puts JSON.parse(response.body)
  ```

  ```php PHP theme={null}
  <?php

  $page = {{page}};
  $url = "https://api.hookpulse.io/v1/api/get_secrets_paginated/?page=" . urlencode($page);

  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'x-hookpulse-api-key: {{x-hookpulse-api-key}}',
      'x-brand-uuid: {{x-brand-uuid}}'
  ]);

  $response = curl_exec($ch);
  curl_close($ch);

  echo $response;
  ?>
  ```
</RequestExample>

## Query parameters

| Parameter | Type    | Required | Description                             |
| --------- | ------- | -------- | --------------------------------------- |
| `page`    | integer | Yes      | Page number to retrieve (starts from 1) |

## Example response

<ResponseExample>
  ```json theme={null}
  {
    "data": [
      {
        "key": "{{key}}",
        "inserted_at": "{{inserted_at}}",
        "secret_uuid": "{{secret_uuid}}",
        "call_key": "{{ #key }}"
      },
      {
        "key": "{{key}}",
        "inserted_at": "{{inserted_at}}",
        "secret_uuid": "{{secret_uuid}}",
        "call_key": "{{ #key }}"
      }
    ],
    "meta": {
      "page": {{page}},
      "total_count": {{total_count}},
      "per_page": {{per_page}},
      "total_pages": {{total_pages}},
      "has_next": {{has_next}},
      "has_prev": {{has_prev}}
    },
    "success": true,
    "timezone": "{{timezone}}"
  }
  ```
</ResponseExample>

## Response fields

### Data array

| Field         | Type   | Description                                                                                    |
| ------------- | ------ | ---------------------------------------------------------------------------------------------- |
| `key`         | string | The secret key name                                                                            |
| `inserted_at` | string | ISO 8601 timestamp when the secret was created (in your brand's selected timezone with offset) |
| `call_key`    | string | Template syntax to use this secret in webhooks (e.g., `{{ #key }}`)                            |
| `secret_uuid` | string | Unique identifier for the secret                                                               |

### Meta object

| Field         | Type    | Description                      |
| ------------- | ------- | -------------------------------- |
| `page`        | integer | Current page number              |
| `total_count` | integer | Total number of secrets          |
| `per_page`    | integer | Number of items per page         |
| `total_pages` | integer | Total number of pages            |
| `has_next`    | boolean | Whether there is a next page     |
| `has_prev`    | boolean | Whether there is a previous page |

### Root fields

| Field      | Type    | Description                                                                                                                       |
| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `success`  | boolean | Indicates if the request was successful                                                                                           |
| `data`     | array   | Array of secret objects                                                                                                           |
| `meta`     | object  | Pagination metadata                                                                                                               |
| `timezone` | string  | IANA timezone identifier indicating the timezone used for all timestamps in the response (matches your brand's selected timezone) |

## Error Responses

If the page is out of range, you will receive:

```json theme={null}
{
  "success": false,
  "timezone": "{{timezone}}",
  "error": "Page out of range",
  "meta": {
    "page": {{page}},
    "total_count": {{total_count}},
    "per_page": {{per_page}},
    "total_pages": {{total_pages}},
    "has_next": {{has_next}},
    "has_prev": {{has_prev}}
  }
}
```


## OpenAPI

````yaml GET /v1/api/get_secrets_paginated/
openapi: 3.0.3
info:
  title: Hookpulse API
  description: >-
    Complete API documentation for Hookpulse. Build powerful integrations with
    our RESTful API.
  version: 1.0.0
  contact:
    name: Hookpulse Support
    email: care@hookpulse.io
    url: https://hookpulse.io
servers:
  - url: https://api.hookpulse.io
    description: Production server
security:
  - apiKeyAuth: []
    brandUuidAuth: []
paths:
  /v1/api/get_secrets_paginated/:
    get:
      description: Retrieve a paginated list of all system secrets stored in your vault
      parameters:
        - name: page
          in: query
          description: Page number to retrieve (starts from 1)
          required: true
          schema:
            type: integer
            format: int32
            minimum: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSecretsPaginatedResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GetSecretsPaginatedResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        data:
          type: array
          items:
            $ref: '#/components/schemas/SecretListItem'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        timezone:
          type: string
          description: >-
            IANA timezone identifier indicating the timezone used for all
            timestamps in the response (matches your brand's selected timezone)
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    SecretListItem:
      type: object
      properties:
        key:
          type: string
          description: The secret key name
        inserted_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp when the secret was created (in your brand's
            selected timezone with offset)
        call_key:
          type: string
          description: 'Template syntax to use this secret in webhooks (e.g., ''{{ ##key }}'')'
        secret_uuid:
          type: string
          description: Unique identifier for the secret
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
          description: Current page number
        total_count:
          type: integer
          description: Total number of secrets
        per_page:
          type: integer
          description: Number of items per page
        total_pages:
          type: integer
          description: Total number of pages
        has_next:
          type: boolean
          description: Whether there is a next page
        has_prev:
          type: boolean
          description: Whether there is a previous page
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-hookpulse-api-key
      description: >-
        API key for authentication. Get this from your dashboard by selecting a
        brand and going to API Keys section.
    brandUuidAuth:
      type: apiKey
      in: header
      name: x-brand-uuid
      description: >-
        Brand UUID for authentication. Get this from your dashboard after adding
        a brand - it will be displayed in the UI.

````