Create an issuer
POST
/__remote/api.vercel.com/v1/kms/issuersCreate a new KMS issuer for the authenticated team, or for the team or organization identified by a Connect policy token. An issuer owns the asymmetric signing keys used to sign tokens and messages.
/__remote/api.vercel.com/v1/kms/issuers
const response = await fetch('/__remote/api.vercel.com/v1/kms/issuers?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "Example Name", "algorithm": "RS256", "claimsSchema": "value", "policy": { "kind": "project-grant", "teamId": "example_id", "projectId": "example_id", "environments": [], "tokenClaims": "value" }, "importKey": "string", "importKeyId": "example_id" }),});
const data = await response.json();console.log(data);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
application/json
A JSON Schema used to validate the resolved token claims when signing tokens for this issuer.
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