Segments API

These are the Segments endpoints of the Keila API. For Keila Cloud, the base URL is https://app.keila.io.

All endpoints, unless stated differently, require Bearer authentication.

get /api/v1/segments

Index segments

Retrieve all segments from your project.

Responses

200 Segment response

  • dataobject[]
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • idstring

      Contact ID

      Example: "c_12345"

    • inserted_atstring

      Example: "2026-05-25T08:53:38.774179Z"

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

    • updated_atstring

      Example: "2026-05-25T08:53:38.774195Z"

  • metaobject
post /api/v1/segments

Create Segment

Request body

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

Responses

200 Segment response

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • idstring

      Contact ID

      Example: "c_12345"

    • inserted_atstring

      Example: "2026-05-25T08:53:38.774179Z"

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

    • updated_atstring

      Example: "2026-05-25T08:53:38.774195Z"

get /api/v1/segments/{id}

Show Segment

Parameters

Name In Type Required Description
id path string yes Segment ID

Responses

200 Segment response

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • idstring

      Contact ID

      Example: "c_12345"

    • inserted_atstring

      Example: "2026-05-25T08:53:38.774179Z"

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

    • updated_atstring

      Example: "2026-05-25T08:53:38.774195Z"

put /api/v1/segments/{id}

Update Segment

Parameters

Name In Type Required Description
id path string yes Segment ID

Request body

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

Responses

200 Segment response

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • idstring

      Contact ID

      Example: "c_12345"

    • inserted_atstring

      Example: "2026-05-25T08:53:38.774179Z"

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

    • updated_atstring

      Example: "2026-05-25T08:53:38.774195Z"

patch /api/v1/segments/{id}

Update Segment

Parameters

Name In Type Required Description
id path string yes Segment ID

Request body

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

Responses

200 Segment response

  • dataobject
    • filterobject

      Filter JSON

      Example: {"email":{"$like":"%keila.io"}}

    • idstring

      Contact ID

      Example: "c_12345"

    • inserted_atstring

      Example: "2026-05-25T08:53:38.774179Z"

    • namestring

      Segment name

      Example: "Rocket scientists and book enthusiasts"

    • updated_atstring

      Example: "2026-05-25T08:53:38.774195Z"

delete /api/v1/segments/{id}

Delete Segment

Parameters

Name In Type Required Description
id path string yes Segment ID

Responses

204 Segment was deleted successfully or didn’t exist.