---
title: "Create an Activity"
method: POST
path: "/activities"
tags: ["Schedule"]
---

# Create an Activity

`POST /activities`

Create a new schedule item

You can create a schedule item at your account level using the `/schedule` path or under a supported resource (livestock, grow locations or equipment by using the path `/:resource_type/:resource_id/activies`. For example`[GET] /animals/:id/activies` will fetch the schedule for this animal.

### **Parameters**

**title** **`REQUIRED`**

The name of your schedule item.

---

**start_time** **`REQUIRED`**

Starting DateTime of your event in `'YYYY-MM-DD HH:MM'` format. A value is required if `all_day` is set to `false`.

---

**end_time** **`REQUIRED`**

Ending DateTime of your event in `'YYYY-MM-DD HH:MM'` format. A value is required if `all_day` is set to `false`.

---

**assigned_to_id** `OPTIONAL`

The ID or email address of the Farmbrite user to assign the item to.

---

**all_day** `OPTIONAL`

Boolean value to indicate the event is all day. Defaults to `false`.

---

**description** `OPTIONAL`

A summary description of the item.

---

**reference_type** `OPTIONAL`

Used to link the item to another resource. Supported values are:

> "animal", "equipment", "plant", "location" 
  

When providing a `reference_type`, you should also provide a `reference_id`. This can also be accomplished by creating the schedule item through its parent resource path. eg; `/animals/:animal_id/activies`.

---

**reference_id** `OPTIONAL`

A Farmbrite ID for the resource type that this record is associated with. This can also be accomplished by creating the schedule item through its parent resource path. eg; `/animals/:animal_id/activies`.

---

**color** `OPTIONAL`

A HEX color value to set the item's color on the calendar or lis view.

---

**latitude** `OPTIONAL`

A latitude value used, with longitude, to tag a certain location on the map.

---

**longitude** `OPTIONAL`

A longitude value used if wanting to tag a certain location on the map.

## Headers

- `Content-Type` string

## Request body

- object

## Response `200`

Successful response

---

[API](https://skmtc.net/farmbrite/apis/farmbrite-api-developers-documentation.md) · [All operations](https://skmtc.net/farmbrite/apis/farmbrite-api-developers-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/farmbrite/farmbrite-api-developers-documentation/revisions/b33a389fa2c0/schema)
