SDKs & Libraries
Official SDKs for the most popular languages. Each SDK wraps the MASK REST API with idiomatic methods, automatic retries, and type-safe responses.
Node.js
TypeScript / JavaScript
npm install @mask/sdkimport { Mask } from "@mask/sdk";
const mask = new Mask({ apiKey: "mk_live_..." });
const link = await mask.links.create({
url: "https://example.com",
slug: "my-link",
});Python
Python 3.8+
pip install mask-sdkfrom mask import MaskClient
client = MaskClient(api_key="mk_live_...")
link = client.links.create(
url="https://example.com",
slug="my-link",
)Go
Go 1.21+
go get github.com/mask-pk/mask-goimport "github.com/mask-pk/mask-go"
client := mask.NewClient("mk_live_...")
link, err := client.Links.Create(&mask.CreateLinkParams{
URL: "https://example.com",
Slug: "my-link",
})cURL
HTTP
curl -X POST https://api.mask.bz/v1/links \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","slug":"my-link"}'