OORQO API
Segments

Create a segment

A dynamic segment is filled from its `rules` right away. Send an `Idempotency-Key` header to retry safely.

POST
/v1/segments

A dynamic segment is filled from its rules right away. Send an Idempotency-Key header to retry safely.

Authorization

http
headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?string

Any unique string up to 255 characters, such as a UUID. Retrying with the same key returns the first response (with Idempotent-Replayed: true) instead of acting twice.

Request Body

application/json
  1. body
name*string
Lengthlength <= 200
type?|

Defaults to static.

Value in"static""dynamic"
rules?array<string>|

Filter rules of a dynamic segment.

Response Body

Segment

application/json
  1. response
data*
Example Request
curl -X POST 'https://app.orqo.site/api/v1/segments' \  -H 'Idempotency-Key: 9f1c2a7e-4b8d-4e57-a3f0-6c1d2e3f4a5b' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "data": {    "id": 0,    "name": "string",    "type": "string",    "rules": {      "property1": null,      "property2": null    },    "contact_count": 0,    "created_at": "string",    "updated_at": "string"  }}