Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Latest commit

 

History

History

tokens

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Tokens

Create Token

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.createToken({
  domain_id: "...",
  name: "...",
  scopes: ["..."],
});
import { createToken } from "@nuro.dev/mailersend.ts";

const result = await createToken("API_KEY", {
  domain_id: "...",
  name: "...",
  scopes: ["..."],
});

Delete Token

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.deleteToken("TOKEN_ID");
import { deleteToken } from "@nuro.dev/mailersend.ts";

const result = await deleteToken("API_KEY", "TOKEN_ID");

Update Token

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.updateToken({
  status: "...",
  tokenId: "...",
});
import { updateToken } from "@nuro.dev/mailersend.ts";

const result = await updateToken("API_KEY", {
  status: "...",
  tokenId: "...",
});