# API collections

An API client collection is available for testing and exploring the Namirial Notify APIs. The collection includes ready-to-use request definitions, environment configurations, and saved response examples for EviSMS, EviMail, and EviNotice.

> **EviPost** is not currently included in the collection. Requests can be tested manually using the examples in the [EviPost API](/products/namirialnotify/apis/evipost-api).


The collection is provided in [Bruno](https://www.usebruno.com/) format. Bruno is an open-source API client similar to Postman. The collection can also be imported into Postman and other compatible tools.

## Collection structure

The collection is organised by service, with each service containing its Submit and Query operations:


```
Collection root
├── EviSMS/
│   ├── EviSMS Submit/
│   │   ├── EviSMS Submit.yml          (full request with variables)
│   │   └── EviSMS Submit (simple).yml (inline values, minimal options)
│   └── EviSMS Query/
│       └── EviSMS Query.yml           (GET with query parameters)
├── EviMail/
│   ├── EviMail Submit/
│   │   ├── EviMail Submit.yml         (full request with variables)
│   │   └── EviMail Submit (simple).yml(inline values, minimal options)
│   └── EviMail Query/
│       └── EviMail Query.yml          (GET with query parameters)
├── EviNotice/
│   ├── EviNotice Submit/
│   │   ├── EviNotice Submit.yml                 (full request with variables)
│   │   ├── to email (Standard - simple).yml     (Standard_EU, minimal options)
│   │   ├── to email (Advanced - simple).yml     (Advanced_EU, minimal options)
│   │   ├── to email (Advanced - complete).yml   (Advanced_EU, all options)
│   │   ├── to mobile (Standard - simple).yml    (SMS notification channel)
│   │   └── to mobile (Standard - complete).yml  (SMS with full configuration)
│   ├── EviNotice Query.yml            (POST with request body)
│   ├── EviNotice GET.yml              (GET single by ID)
│   ├── EviNotice GET Affidavits.yml   (GET affidavits)
│   └── EviNotice GET Attachments.yml  (GET attachments as ZIP)
└── environments/
    ├── EviSMS.yml
    ├── EviMail.yml
    └── EviNotice.yml
```

## Environments

Each service has its own environment file with pre-configured variables. Before running any request, select the environment matching the service you want to test.

The environment files define variables for:

- **Credentials** — `User` and `Password` for Basic authentication. These must be replaced with your own account credentials before use.
- **Base URL** — `baseUrl` points to the target environment. By default, the environments use the pre-production server (`api.ecertia.com`).
- **Recipient details** — test values for `recipient_email`, `recipient_mobileNumber`, `recipient_displayName`, and `recipient_legalName`.
- **Issuer details** — `issuer_legalName` and related fields.
- **Message content** — `Subject`, `Body` or `Text`, `LookupKey`, and other request-specific fields.
- **Certification options** — `certificationLevel`, `TTL` (time to live in minutes), `affidavit_Kinds`, `language`.
- **Attachment data** — base64-encoded sample attachment data for services that support attachments.


The environment files may contain sample credentials. Replace all authentication values with your own credentials before running requests against any environment.

## Runtime scripts

The collection includes runtime scripts that automate common tasks during testing:

**Before-request scripts** automatically increment the `LookupKey` variable before each submit request. This ensures each test submission gets a unique lookup key without manual intervention.

**After-response scripts** capture the returned ID from submit responses and store it in an environment variable (`eviId` for EviSMS and EviMail, `Id` for EviNotice). This makes the ID immediately available for follow-up query or get requests in the same session.

## Saved response examples

Most requests in the collection include one or more saved response examples showing real responses from the pre-production environment. These examples include full response headers and JSON bodies.

The saved examples cover common scenarios such as successful submissions (HTTP 200 with a returned ID), successful queries with matching results, and queries with no matches.

## How to use the collection

### With Bruno

1. Download or clone the collection folder.
2. Open Bruno and select **Open Collection**, then point to the collection root folder.
3. Select the environment matching the service you want to test (for example, `EviSMS`).
4. Replace the `User` and `Password` variables in the environment with your credentials.
5. Open a request and click **Send**.


### With Postman

1. In Postman, select **Import** and choose the collection folder or individual `.yml` files.
2. Postman will convert the Bruno format on import.
3. Create a Postman environment with the same variable names defined in the Bruno environment files.
4. Replace credentials and base URL as needed.


## Related

- [API documentation](/products/namirialnotify/dev/api-documentation)
- [EviSMS API](/products/namirialnotify/apis/evisms-api)
- [EviMail API](/products/namirialnotify/apis/evimail-api)
- [EviNotice API](/products/namirialnotify/apis/evinotice-api)
- [EviPost API](/products/namirialnotify/apis/evipost-api)