---
title: "Add new email to newsletter"
method: POST
path: "/newsletter-subscription"
tags: ["newsletter"]
---

# Add new email to newsletter

`POST /newsletter-subscription`

## Request

- Base URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1`
- URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1/newsletter-subscription`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/docs/newsletter-subscription/post.ts> (a function with typed inputs; its response is checked against the schema)

Add a new email entry.

## Request body

- NewsletterSchema
  - `email` string

## Response `201`

Email added successfully

- SuccessResponseSchema2
  - `status` string
  - `status_code` integer: The HTTP status code. Usually 200 , 201, 204 etc
  - `message` string: A basic message describing a request was processed successfully. example: "Successfully"

## Other responses

- `400`: Bad Request
- `401`: Authentication error
- `500`: Server error

## Changes

- **2024-08-07** `f777e29f0ee3`: 1 info
  - endpoint added
- **2024-08-07** `06cecc2ac126`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/changes/newsletter-subscription/post.md)

---

[API](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger.md) - [All operations](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/llms.txt) - [OpenAPI document](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/revisions/2d1d3ed96bb9?raw)
