Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Create a recipient

Creates a recipient.

Creates a recipient.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/recipients
  • Scope notify:write
  • Effect write — a successful call changes state.
  • Collection recipients
  • Query recipient_id, validate_only

#Request

FieldTypeWhat it is
parentstringThe parent to create in. Required.
recipient_idstringThe recipient id, the final name segment; the server assigns one when empty.
recipientRecipientThe recipient to create; only caller-writable fields are read. Required.
validate_onlyboolValidate and return the result without writing anything.

#Recipient

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/recipients/{recipient}.
metaResourceMetaResource metadata.
external_keystringThe customer's own id for this user, for example an Auth end user name.
email_addressesstring[]Email addresses, first is preferred.
phone_numbersstring[]E.164 phone numbers, first is preferred.
devicesPushDevice[]Push devices.
language_codestringBCP 47 language for templates; default the environment's.
time_zonestringIANA time zone for quiet hours and digests.
testboolA test recipient: its messages are rendered and captured on the Message, never delivered. An email address whose local part carries +sylphx_test is a test address whatever this says.

#ResourceMeta

FieldTypeWhat it is
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.

#PushDevice

FieldTypeWhat it is
platformPushPlatformThe platform. Required. One of apns, fcm, web_push.
device_tokenstringThe device token; write-only. Required. Never returned again.
senderstringThe push Sender the token belongs to. Required.

#Response

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/recipients/{recipient}.
uidstringrcp_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
external_keystringThe customer's own id for this user, for example an Auth end user name.
email_addressesstring[]Email addresses, first is preferred.
phone_numbersstring[]E.164 phone numbers, first is preferred.
devicesPushDevice[]Push devices.
language_codestringBCP 47 language for templates; default the environment's.
time_zonestringIANA time zone for quiet hours and digests.
testboolA test recipient: its messages are rendered and captured on the Message, never delivered. An email address whose local part carries +sylphx_test is a test address whatever this says.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#PushDevice

FieldTypeWhat it is
platformPushPlatformThe platform. Required. One of apns, fcm, web_push.
device_tokenstringThe device token; write-only. Required. Never returned again.
token_last4stringThe last four characters of the token, for display. Output only.
senderstringThe push Sender the token belongs to. Required.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/recipients" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'