All Collections
How To
Nikabot for Devs
How to use the "Create project" API call?
How to use the "Create project" API call?

Create projects and time off types through NikaTime's open API.

NikaTime avatar
Written by NikaTime
Updated over a week ago

If your team has access to an API key, you'll be able to use its several functionalities including creating new Projects and Time off types.

The following are the fields used in the Create project API call:





Name of the new Project or Time off type

"string", must be a unique name,
invalid characters: ; , . ! ? ' { } $ " \ = /


Author's Slack member ID. *


pto status

The pto status indicates if you're creating a Time off type or not.

Set true for Time off type, and false for Project.

true, false

pto isDateRange

In case it is a Time off type, isDateRange indicates if this type enables Data range** (such as Vacation or Parental leave) or if it's a single day type (such as Public holiday, or Day off).

true, false


Any custom Ref ID you use for your Projects or Time off types.

"string", optional


The name of the Project's Client.

"string", optional


The name of the Project or Time off type's Type.

"string", optional


The number of Total estimated hours of your Project.

float, optional


Your Project or Time off type's description.

"string", optional


assignedGroups indicates which user Groups have been assigned to your Project. Only users belonging to these groups will be able to see this Project or Time off type when logging their time. These Groups must be previously created in the Report Center.

["string" ], optional

* The Slack member ID is alpha-numeric in this format: XXXXXXXXXXX.

You can find it by clicking on the user picture on Slack, click on "View full profile", then on the "More" button, and finally "Copy member ID". You can also get these IDs directly from the API with the Get Users calls.

** Time off types with Data range enabled will allow users that log this type, to set a date until when this type will be active.







Project or Time off type was successfully created.


The authorId is incorrect, doesn't belong to your workspace, or can't create Projects or Time off types.


The API key is incorrect. (Don't forget to prefix Bearer when testing.)

Did this answer your question?