> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Departure

> Add a departure instance to a product and automatically sync availability.

## Method

`POST` `/v1/departures`

## Body Parameters

<ParamField name="productId" type="uuid">Product ID that owns the departure (required).</ParamField>
<ParamField name="startAt" type="datetime">Departure start timestamp in ISO 8601 (required).</ParamField>
<ParamField name="endAt" type="datetime">Return/end timestamp (optional).</ParamField>
<ParamField name="capacity" type="integer">Total seats/slots available (defaults to 0).</ParamField>
<ParamField name="status" type="string">`planned`, `scheduled`, `cancelled`, or `completed` (defaults to `planned`).</ParamField>
<ParamField name="meetingPoint" type="string | object">Free-text or structured meeting point details.</ParamField>
<ParamField name="transportModeId" type="uuid">Linked transport mode (optional).</ParamField>
<ParamField name="transportConfigId" type="uuid">Specific transport configuration (optional).</ParamField>
<ParamField name="itineraryId" type="uuid">Pinned itinerary ID (optional).</ParamField>
<ParamField name="itineraryVersionId" type="uuid">Specific itinerary version to pin (optional).</ParamField>
<ParamField name="shipId" type="uuid">Ship or vessel reference (optional).</ParamField>
<ParamField name="isDirectionReverse" type="boolean">Whether itinerary direction is reversed (defaults to `false`).</ParamField>
<ParamField name="externalCodes" type="object">Integration identifiers (optional).</ParamField>
<ParamField name="attributes" type="object">Custom metadata map (defaults to `{}`).</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/departures \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "productId": "prod_123",
      "startAt": "2025-06-01T08:00:00Z",
      "endAt": "2025-06-05T18:00:00Z",
      "capacity": 24,
      "status": "scheduled",
      "meetingPoint": { "name": "Athens Marina" }
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/departures", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      productId: "prod_123",
      startAt: "2025-06-01T08:00:00Z",
      capacity: 24,
      status: "scheduled",
      attributes: { channel: "summer" },
    }),
  })
  ```

  ```python Python theme={null}
  import os, requests

  payload = {
    "productId": "prod_123",
    "startAt": "2025-06-01T08:00:00Z",
    "status": "planned",
    "capacity": 12,
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/departures",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  created = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "data": {
      "id": "dep_456",
      "productId": "prod_123",
      "startAt": "2025-06-01T08:00:00.000Z",
      "endAt": "2025-06-05T18:00:00.000Z",
      "capacity": 24,
      "status": "scheduled",
      "meetingPoint": { "name": "Athens Marina" },
      "transportModeId": null,
      "transportConfigId": null,
      "itineraryId": null,
      "itineraryVersionId": null,
      "shipId": null,
      "isDirectionReverse": false,
      "externalCodes": null,
      "attributes": {},
      "createdAt": "2025-02-20T12:34:56.000Z"
    }
  }
  ```
</ResponseExample>
