Samva is in early access — self-serve signup is limited. Have a team invite? Sign up with that email. Contact us for access.

Samva

Import the Postman collection

Import the Samva email API into Postman from the OpenAPI spec and authenticate your requests with an API key.

Import the Samva API into Postman to test and explore the email endpoints from a request client. Postman builds the collection from the published OpenAPI spec, so it always reflects the current API.

Email first. Samva is launching with email. SMS, WhatsApp, and voice are staged and will be documented as they ship.

Import the collection

Postman can build a collection directly from the OpenAPI spec.

  1. Open Postman.
  2. Click Import in the top left.
  3. Select the Link tab.
  4. Enter https://api.samva.app/v1/openapi.json.
  5. Click Continue, then Import.
  1. Open api.samva.app/v1/openapi.json and save the file locally.
  2. In Postman, click Import then Upload Files.
  3. Select the saved JSON file and import it.

Authenticate the collection

Set your API key once at the collection level so every request inherits it.

  1. Click the collection name in the sidebar.
  2. Go to the Variables tab.
  3. Add a variable named apiKey and set its value to your API key.
  4. Click Save.

Then configure the collection's authorization:

  1. Go to the Authorization tab.
  2. Select API Key as the type.
  3. Set Key to x-api-key.
  4. Set Value to {{apiKey}}.
  5. Set Add to to Header.

Requests authenticate with the x-api-key header. See Authentication for details on creating and scoping keys.

Set up environments

Use Postman environments to switch between production and staging without editing requests.

// Production
{
  "baseUrl": "https://api.samva.app/v1",
  "apiKey": "sk_sm_your_production_key"
}
// Staging
{
  "baseUrl": "https://staging.api.samva.app/v1",
  "apiKey": "sk_sm_your_test_key"
}

Send a test request

  1. Open the request for POST /v1/messages.

  2. Set the body to an email send payload:

    {
      "to": [{ "email": "ada@example.com" }],
      "channel": "email",
      "email": {
        "subject": "Welcome to Samva",
        "html": "<h1>Welcome!</h1>"
      }
    }
  3. Click Send and check the response.

Next steps

On this page