Przejdź do głównej treści
PATCH
/
api
/
v1
/
segments
/
{segmentId}
Zaktualizuj segment
curl --request PATCH \
  --url https://api.railmail.app/api/v1/segments/{segmentId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "rules": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "segmentKey": "<string>",
  "name": "<string>",
  "description": "<string>",
  "type": "<string>",
  "rules": "<string>",
  "status": "<string>",
  "memberCount": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Autoryzacje

X-API-Key
string
header
wymagane

Project-scoped API key, format rm_(live|test)_... . May also be sent as Authorization: Bearer rm_....

Parametry ścieżki

segmentId
string<uuid>
wymagane

Segment id (UUID).

Treść

application/json
name
string | null
Maximum string length: 200
description
string | null
Maximum string length: 500
status
enum<string> | null
Dostępne opcje:
ACTIVE,
INACTIVE,
ARCHIVED
rules
string | null

Odpowiedź

Zaktualizowany segment

id
string<uuid>
segmentKey
string | null
name
string
description
string | null
type
string
rules
string | null
status
string
memberCount
integer<int64> | null
createdAt
string<date-time>
updatedAt
string<date-time>