cURL
curl --request POST \ --url https://api.withampersand.com/v1/projects/{projectIdOrName}/jwt-keys \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <api-key>' \ --data '{ "name": "production-key-1", "algorithm": "RSA", "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4f5wg5l2hKsTeNem/V41\nfGnJm6gOdrj8ym3rFkEjWT2btf2QisEgQG5WQwTfEUvUNR8JW5FQ0mKJ5I4LhXq6\nV5gN6kSKs2cUdD8Ky7Lj7kqn6I3l3r3F2fK9MFjZ8tU5z4z4yHdF6W2C3k5vf3f\n-----END PUBLIC KEY-----\n" }'
201
example1
{ "kid": "550e8400-e29b-41d4-a716-446655440000"}
Creates a new JWT key for the specified project with RSA public key for token verification
Ampersand Project ID or name.
JWT key created successfully
The response is of type object.
object
Was this page helpful?