# Add partner public key Adds a public key for a partner organization to use for token exchange authentication. Only one active key is allowed per organization. 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): - `publicKeyJwk` (string, required) Public key in JWK (JSON Web Key) format. Must include a 'kid' field. Supported key types: RSA, EC. Example: "{\"kty\":\"RSA\",\"alg\":\"RS256\",\"kid\":\"my-key-1\",\"n\":\"...\",\"e\":\"AQAB\"}" ## Response 201 fields (application/json): - `id` (string) Unique identifier for the key. - `orgId` (string) Organization this key is scoped to. - `kid` (string) Key ID extracted from the JWK. - `status` (string) Key status. Enum: "ACTIVE", "REVOKED" - `createdAt` (string) Timestamp when the key was created. - `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.