createProject
Create one or more new projects
/Projects
Usage and SDK Samples
await xero.setTokenSet(tokenSet);
const xeroTenantId = 'xeroTenantId_example';
const idempotencyKey = 'KEY_VALUE';
try {
const response = await xero.accountingApi.createProject(xeroTenantId, projectCreateOrUpdate, idempotencyKey);
console.log(response.body || response.response.statusCode)
} catch (err) {
const error = JSON.stringify(err.response.body, null, 2)
console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}
Scopes
projects | Grant read-write access to projects |
Parameters
Name | Description |
---|---|
Xero-Tenant-Id* |
String
Xero identifier for Tenant
Required
|
Idempotency-Key |
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
Name | Description |
---|---|
projectCreateOrUpdate * |
ProjectCreateOrUpdate
Create a new project with ProjectCreateOrUpdate object
Required
|