---
title: "Create a new timezone"
method: POST
path: "/timezones"
tags: ["timezone"]
---

# Create a new timezone

`POST /timezones`

## Request

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

Creates a new timezone entry.

## Request body

- TimezoneSchema
  - `timezone` string
  - `gmt_offset` string
  - `description` string

## Response `201`

Timezone created 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`: 2 warning, 3 info
  - removed the request property `identifier`
  - removed the request property `offset`
  - added the new optional request property `description`
  - added the new optional request property `gmt_offset`
  - …1 more
- **2024-08-07** `06cecc2ac126`: 3 warning, 2 info
  - removed the request property `description`
  - removed the request property `gmt_offset`
  - removed the request property `timezone`
  - added the new optional request property `identifier`
  - …1 more

[Operation history](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/changes/timezones/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)
