# Add partner public key Adds one or more public keys for a partner organization to use for token exchange authentication. Accessible to TMC, company, and global admins. Endpoint: POST /v2/companies/{companyId}/partner-public-keys Version: v2 Security: Bearer ## Path parameters: - `companyId` (string, required) Organization identifier. Example: "4974a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `keyType` (string, required) The type of public key being registered. Enum: "JWKS" - `jwks` (object) JWKS containing the RSA public key. Required when keyType is JWKS. - `jwks.keys` (array, required) List of public keys. Exactly one key must be provided per request. - `jwks.keys.kty` (string, required) Key type. Only RSA is supported. Enum: "RSA" - `jwks.keys.use` (string, required) Key use. Must be sig (signature). Enum: "sig" - `jwks.keys.alg` (string, required) Signing algorithm. Must be RS256. Enum: "RS256" - `jwks.keys.kid` (string, required) Key ID — used to match the JWT header kid during token exchange. - `jwks.keys.n` (string, required) RSA modulus (base64url-encoded). - `jwks.keys.e` (string, required) RSA public exponent (base64url-encoded). ## Response 201 fields (application/json): - `keys` (array) List of added partner public keys. - `keys.id` (string) Unique identifier for the key. - `keys.orgId` (string) Organization this key is scoped to. - `keys.kid` (string) Key ID extracted from the JWK. - `keys.status` (string) Key status. Enum: "ACTIVE", "REVOKED" - `keys.createdAt` (string) Timestamp when the key was created. - `keys.thumbprint` (string) RFC 7638 JWK thumbprint (base64url SHA-256 of canonical key material). Use this to verify the correct key was registered. ## Response 400 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.