v2

latestOpenAPI 3.1.02026-07-312303692.4 MB
Message

Create Message Attempt For Endpoint

Creates and sends a message to the specified endpoint.

The message attempt and response from the endpoint is returned.

post/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt

Path parameters

app_idstring required

The Application's ID or UID.

Example:unique-identifier

The Application's ID or UID.

endpoint_idstring required

The Endpoint's ID or UID.

Example:unique-identifier

The Endpoint's ID or UID.

Headers

idempotency-keystring

The request's idempotency key

Request body

eventIdstring nullable

Optional unique identifier for the message

eventTypestring required

The event type's name

payloadobject required

JSON payload to send as the request body of the webhook.

We also support sending non-JSON payloads. Please contact us for more information.

channelsstring[] nullable

List of free-form identifiers that endpoints can filter by

tagsstring[] nullable

List of free-form tags that can be filtered by when listing messages

transformationsParamsobject nullable

Extra parameters to pass to Transformations (for future use)

deliverAtstring date-time nullable

The date and time at which the message will be delivered.

Note that this time is best-effort-only. Must be at least one minute and no more than 24 hours in the future.

payloadRetentionPeriodinteger nullable

Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with payloadRetentionHours.

payloadRetentionHoursinteger nullable

Optional number of hours to retain the message payload. Note that this is mutually exclusive with payloadRetentionPeriod.

Example request

{
  "eventId": "unique-identifier",
  "eventType": "user.signup",
  "payload": {
    "type": "user.created",
    "email": "test@example.com",
    "username": "test_user"
  },
  "channels": [
    "project_123",
    "group_2"
  ],
  "application": {
    "name": "My first application",
    "uid": "unique-identifier"
  },
  "tags": [
    "my_tag",
    "other"
  ],
  "payloadRetentionPeriod": 90
}

Response

urlstring uri required
responsestring required
responseStatusCodeinteger required
responseDurationMsinteger required

Response duration in milliseconds.

status0 | 1 | 2 | 3 | 4 required

The sending status of the message:

  • Success = 0
  • Pending = 1
  • Fail = 2
  • Sending = 3
  • Canceled = 4
statusText'success' | 'pending' | 'fail' | 'sending' | 'canceled' required
triggerType0 | 1 required

The reason an attempt was made:

  • Scheduled = 0
  • Manual = 1
msgIdstring required

The Message's ID.

endpointIdstring required

The Endpoint's ID.

idstring required

The MessageAttempt's ID.

timestampstring date-time required

Example response

{
  "url": "https://example.com/webhook/",
  "response": "{}",
  "responseStatusCode": 200,
  "msgId": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2",
  "endpointId": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2",
  "id": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2",
  "msg": {
    "eventId": "unique-identifier",
    "eventType": "user.signup",
    "payload": {
      "type": "user.created",
      "email": "test@example.com",
      "username": "test_user"
    },
    "channels": [
      "project_123",
      "group_2"
    ],
    "id": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2",
    "tags": [
      "project_1337"
    ]
  }
}