latestOpenAPI 3.0.1Proprietary2026-08-1844131294.9 KB

59cd6443fdbf

Magic Links

Generate Authorization Code

Generates an authorization code for a strategic partner customer user.

Extracts partner ID from the JWT token in the Authorization header, looks up the platform user ID, and generates a short-lived auth code.

Security considerations:

  • Requires valid Bearer token in Authorization header
  • Auth code is short-lived (typically 60 seconds)
  • Auth code can only be used once

Authentication:

  • Requires Bearer token in Authorization header
post/authenticate/partner/request-authcode

Headers

Authorizationobject required

Bearer token for partner authentication

Request body

customerUserIdstring

The customer user ID for which to generate the auth code (UUID). Either this or (customerId+email+firstName+lastName) must be provided.

customerIdstring

The customer ID for auto-provisioning. Required if customerUserId is not provided.

emailstring email

User email for auto-provisioning. Required if customerUserId is not provided.

firstNamestring

User first name for auto-provisioning. Required if customerUserId is not provided.

lastNamestring

User last name for auto-provisioning. Required if customerUserId is not provided.

scope'ADMIN' | 'MANAGER' | 'PAYROLL_ADMIN' | 'BILLING_ADMIN' | 'HR_ADMIN' | 'IT_ADMIN'

User scope/role for access permissions

Example request

{
  "customerUserId": "759a086f-48b3-4e34-aefd-00c8a9e68523",
  "customerId": "a7e55f28-8395-4884-8469-d16d90051b57",
  "email": "john.doe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "scope": "ADMIN"
}

Response

Auth code generated successfully

auth_codestring required

The generated authorization code

expires_ininteger required

Auth code expiration time in seconds

customer_user_idstring

The customer user ID (UUID). Included when a user was auto-provisioned.

Example response

{
  "auth_code": "abc123def456",
  "expires_in": 60,
  "customer_user_id": "759a086f-48b3-4e34-aefd-00c8a9e68523"
}