Skip to main content
POST
Creates an account for the user e.g. a Xero account
This endpoint requires a valid authorisation for the user. If no active authorisation exists, the request will be rejected. You can optionally pass the x-teal-authorisation-id header to specify which authorisation to use; otherwise the system will resolve a valid authorisation automatically. See Authorisations for more details.

Authorizations

X-API-KEY
string
header
required

Headers

x-teal-authorisation-id
string<uuid>

Optional authorisation ID to associate with this request. If not provided, the system will attempt to resolve a valid authorisation for the user automatically.

Example:

"7f3b8c2a-1d4e-4f6a-8b8c-9a0b1c2d3e4f"

Body

application/json
user_id
string
required

The id of the user

Example:

"95a0e70b-fe02-4f47-aef9-2efff279df71"

payroll_provider
string
required

The payroll provider to use

Example:

"quickbooks"

from
string<date-time>

Optional start date filter for payroll data retrieval

Example:

"2019-05-17T00:00:00.000Z"

to
string<date-time>

Optional end date filter for payroll data retrieval

Example:

"2019-05-17T00:00:00.000Z"

user_name
string

The login of the user

Example:

"john.smith@company.com"

password
string

The password of the user

Example:

"very-secret-password"

extra_login_params
object

Optional extra login parameters required by some providers. Dayforce connections require extra_login_params.company_name.

Example:

Response

Created

account_id
string
required

The id of the account

Example:

"95a0e70b-fe02-4f47-aef9-2efff279df71"

payroll_provider
string
required

The payroll provider to use

Example:

"quickbooks"

user_name
string
required

The login of the user

Example:

"john.smith@company.com"

created_at
string<date-time>
required
Example:

"2019-05-17T00:00:00.000Z"

status
string

Status of account

Example:

"PENDING"

mfa_enabled
boolean

Is mfa enabled for this account

latest_pay_date
string<date-time>

The latest pay date of the payroll under this account

Example:

"2019-05-17T00:00:00.000Z"

authorization_url
string

Authrorization url for provider using OAUTH2

Example:

"https://provider/authenticate?redirect_url=https://api.teal.com/auth&state=state&scope=read"

mfa_method
object
Example: