Skip to content
Docs

Create an issuer

POSThttps://api.vercel.com/v1/kms/issuers
Create a new KMS issuer for the authenticated team. An issuer owns the asymmetric signing keys that are used to sign tokens and messages.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.kms.createKmsIssuer({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"algorithm": "ES256",
"claimsSchema": "value",
"createdAt": "string",
"id": "icfg_1234567890",
"managedBy": "string",
"name": "Example Name",
"origin": "external",
"ownerId": "example_id",
"policies": [
{
"createdAt": "string",
"environments": [],
"kind": "project-grant",
"projectId": "example_id",
"teamId": "example_id",
"tokenClaims": "value",
"updatedAt": "string"
}
],
"signingKeys": [
{
"activateAt": "string",
"activatedAt": "string",
"algorithm": "string",
"certificatePem": "string",
"createdAt": "string",
"importKeyId": "example_id",
"issuerId": "example_id",
"keyId": "example_id",
"publicKey": {
"alg": "string",
"key_ops": [],
"kid": "example_id",
"kty": "string",
"use": "string",
"x5c": [],
"x5t#S256": "string"
},
"publicKeyFingerprint": "string",
"publicKeyPem": "string",
"revokeAt": "string",
"status": "active",
"updatedAt": "string"
}
],
"updatedAt": "string"
}
AuthorizationbearerToken

Default authentication mechanism

teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
namestringRequired
The name of the issuer.
algorithmstringOptional
The signing algorithm to use for the issuer.
claimsSchemaobjectOptional
A JSON Schema used to validate the resolved token claims when signing tokens for this issuer.
policyobjectOptional2 variants
importKeystringOptional
The PEM-encoded private key to use for the issuer.
importKeyIdstringOptional
The key id to use as the imported key's JWT/JWKS kid. Only allowed when importKey is provided. Not required to be unique; the addressable key id is the server-minted keyId returned in the response.
201Success
algorithmstringRequired
claimsSchemaobjectOptional
createdAtstringRequired
idstringRequired
managedBystringOptional
namestringRequired
originstringRequired
ownerIdstringRequired
policiesarrayRequired
signingKeysarrayRequired
updatedAtstringRequired
400One of the provided values in the request body is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error