---
title: "Search calendars"
method: GET
path: "/api/v1/campaigns/calendars/search"
tags: ["campaigns"]
---

# Search calendars

`GET /api/v1/campaigns/calendars/search`

## Request

- Base URL: `https://point11.ai`
- URL: `https://point11.ai/api/v1/campaigns/calendars/search`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.point11.ai/oauth2/authorize`, token URL `https://auth.point11.ai/oauth2/token`)

Search the organization calendar by customer name, campaign name or a date phrase over the months around the grid being viewed. Returns the date the phrase names, matching campaigns, matching customers with their interaction counts, and those interactions in time order, at most 100, the ones nearest `anchor`; `truncated` says more customers or interactions matched than are returned, so more words narrow it; `failed` counts campaigns whose read failed. A query shorter than two characters reads only as a date. `view` "year" is a deprecated alias read as "month", so it searches a month's horizon.

## Query parameters

- `view` 'day' | 'week' | 'month' | 'agenda' | 'year', required: "year" is a deprecated alias read as "month", so it searches a month's horizon.
- `anchor` string, required
- `zone` string, required
- `query` string, required
- `wide` boolean: Search six months each side of the grid, not one.
- `products` string[]: Keep only these products' campaigns; none keeps every product.
- `profiles` string[]: Keep only these business profiles' campaigns; none keeps every profile.

## Headers

- `Point11-Organization` string, uuid

## Response `200`

Success.

- CampaignsCalendarsSearchResponse
  - `hits` union[], required: A date first, then campaigns, then customers, then interactions in time order.
    - union
      - object
        - `kind` 'date', required
        - `view` 'day' | 'week' | 'month' | 'agenda', nullable, required
        - `anchor` string, required
        - `label` string, required
      - object
        - `kind` 'campaign', required
        - `campaign` object, required
          - `type` 'discovery' | 'research' | 'experience', required
          - `id` string, required
          - `name` string, required
      - object
        - `kind` 'customer', required
        - `customerId` string, required
        - `name` string, required
        - `entryCount` integer, required
      - object
        - `kind` 'entry', required
        - `entry` CampaignsCustomerEntriesItem, required
          - `lifecycle` 'scheduled' | 'committed' | 'running' | 'finished' | 'cancelled' | 'unknown', required
          - `waitingReason` string, nullable: Why scheduled work is not admitted yet, when known.
          - `scheduledAt` string, nullable, required
          - `admittedAt` string, nullable, required
          - `startedAt` string, nullable, required
          - `finishedAt` string, nullable, required
          - `executionId` string, nullable, required
          - `outcome` 'running' | 'succeeded' | 'failed' | 'cancelled' | 'partial', nullable, required
          - `rerun` true: Present on an edit's rerun: a customer whose edit gave it a new version, rerun once on it as its run of the campaign's current period. It is its own entry and never moves.
          - `inClosedHour` true: Present on a scheduled interaction a person or an order placed in an hour the calendar rules now close. It stays where it was placed.
          - `missed` true: Present on an interaction whose month closed with no run admitting it. Its lifecycle stays `scheduled`, it stays on its day, and it no longer moves.
          - `movedFrom` object: Present when the plan moved the interaction since placing it; absent when a person placed it.
            - `at` string, required: Where the plan first placed the interaction.
            - `reason` 'catch_up' | 'rules_save', required: Why the plan moved it: `catch_up`, its slot passed unrun; `rules_save`, the calendar rules changed.
          - `capabilities` object, required
            - `move` boolean, required
            - `cancel` boolean, required
            - `restore` boolean, required
            - `reasonCode` string, nullable, required
            - `reason` string, nullable, required
            - `moveMonth` string: `YYYY-MM`: the UTC month a move must stay inside, where one bounds it.
          - `entryId` string, required
          - `lineId` string, required
          - `name` string, required
          - `targetAt` string, required
          - `kind` 'customer'
          - `customerId` string, required
          - `customerKey` string, nullable, required
          - `jobTitle` string, nullable, required
          - `age` string, nullable, required
          - `avatarUrl` string, nullable, required
          - `campaign` object, required
            - `type` 'discovery' | 'research' | 'experience', required
            - `id` string, required
            - `name` string, required
          - `paused` true: Paused activity: the campaign's own pause (status Paused) holds this interaction, which will not start while it stays paused, and `showPaused: false` leaves it out of the calendar. A paused subscription marks none, unlike `campaigns[].paused`, which also reads an Active campaign under a paused subscription as paused. Absent otherwise.
  - `horizon` object, required: The first and last `YYYY-MM` searched.
    - `from` string, required
    - `to` string, required
  - `truncated` boolean, required: More customers or interactions matched than are returned: more words narrow it.
  - `failed` integer, required

## Other responses

- `400`: The input, query, or Idempotency-Key is invalid.
- `401`: The bearer is missing, expired, or not accepted.
- `403`: The credential lacks the operation's scope or role, or the operation needs a different door.
- `404`: The resource or organization does not exist for this caller.
- `405`: This path takes another HTTP method, named in `Allow`.
- `409`: The request conflicts with current state or with prior use of its Idempotency-Key.
- `413`: The request, or the answer it asks for, is too large; narrow it.
- `429`: The credential's rate budget is spent; retry after `Retry-After` seconds.
- `500`: An unexpected server failure; retry later. Only `request_id` identifies it.
- `503`: A dependency is temporarily unavailable; retry after `Retry-After` seconds.
- `default`: Another status a product answers for its own refusal (for example `415` for an unsupported attachment); branch on `code`.

---

[API](https://skmtc.dev/point11/apis/point11-api.md) · [All operations](https://skmtc.dev/point11/apis/point11-api/llms.txt) · [OpenAPI document](https://skmtc.dev/point11/apis/point11-api/revisions/36a84c7aca11?raw)
