Timekit developers

POST /resources

Create a resource

Create a new resource.

Bookable resources can represent people (employees, vendors), items (screwdriver, musical instrument) or locations (meeting rooms).

When you interact with the API to create new bookings and fetch availability, you will have to authenticate as your resource using an email and API token. The api_token returned in the response is your credentials that you must save and use for future API requests. See authentication for more info.

Do also note that this endpoint simply creates a plain Timekit resources. If you want to create a user-resource based on a Google account, please see [GET] /accounts/google/signup

Endpoint

POST https://api.timekit.io/v2/resources

Parameters

Name In Type Required Default Description
name body string yes Set the name of the resource
timezone body string yes Timezone of the resources
email body string Email of the resources
first_name body string First name of the resources, useful if you're creating users as resources
last_name body string Last name of the resources
password body string Password of the resources (if not set, a random password will be assigned - can be reset subsequently)

Request examples

curl
curl -X POST \
		 -H 'Timekit-App: back-to-the-future' \
     -d '{
           "email": "doc.brown@timekit.io",
           "timezone": "America/Los_Angeles",
           "name": "Doc Brown",
    			 "password": "FluxCapacitator"
       }' \
  https://api.timekit.io/v2/resources
json
{
    "email": "doc.brown@timekit.io",
    "timezone": "America/Los_Angeles",
    "first_name": "Emmet",
    "last_name": "Brown",
    "password": "FluxCapacitator"
}

Response examples

201

json
{
  "data": {
    "id": "d187d6e0-d6cb-409a-ae60-45a8fd0ec879",
    "first_name": "Emmet",
    "last_name": "Brown",
    "name": "Emmet Brown",
    "email": "doc.brown@timekit.io",
    "image": "http://www.link-to-img.com/image.png",
    "activated": false,
    "timezone": "America/Los_Angeles",
    "last_sync": null,
    "api_token": "nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW"
  }
}

422

json
{
  "errors": {
    "name": [
    	"The name field is required."
    ],
    "timezone": [
    	"The timezone field is required."
    ]
  }
}