PhoenixPerpetualsDocs API v1
Get an API key

API reference ยท Webhooks

GET/v1/webhook-endpoints/{endpoint_id}/deliveries/{delivery_id}

Get a delivery⁠.

Read

Path parameters#

Responses#

200OK
  • idstringrequired

    The delivery.

  • endpoint_idstringrequired

    Its endpoint.

  • event_idstringrequired

    The event sent (the same id when it is sent again).

  • event_typestringrequired

    The event's type.

  • account_idstring or nullrequired

    Its account.

  • testbooleanrequired

    A test.

  • statusstringrequired

    pending: waiting for its next try. failed: every try failed. canceled: the endpoint was disabled or deleted.

    One ofpendingdeliveringdeliveredfailedcanceled

  • attemptsarray of objectrequired

    Every try, oldest first.

    Show 6 fields
    • attemptintegerrequired

      Which try.

    • atinteger, Unix msrequired

      When.

    • http_statusinteger or nullrequired

      What your endpoint answered; null when it could not be reached.

    • errorstring or nullrequired

      Why it failed, when it did (timeout, redirect, private_address, http_500, ...).

    • duration_msinteger or nullrequired

      How long it took.

    • responsestring or nullrequired

      The start of the answer (up to 512 bytes).

  • next_attempt_atinteger, Unix ms or nullrequired

    When it is tried again.

  • created_atinteger, Unix msrequired

    When it was queued.

  • delivered_atinteger, Unix ms or nullrequired

    When your endpoint took it.

401The request has no Authorization header.
{
  "error": {
    "type": "authentication",
    "code": "missing_api_key",
    "message": "No API key: send it as Authorization: Bearer <key>.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#missing_api_key"
  }
}
403The key only works from the addresses you listed.
{
  "error": {
    "type": "permission",
    "code": "ip_not_allowed",
    "message": "This address is not on the key's allowlist.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#ip_not_allowed"
  }
}
404The id is unknown, or belongs to another customer or environment.
{
  "error": {
    "type": "not_found",
    "code": "webhook_endpoint_not_found",
    "message": "No webhook endpoint with that id.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#webhook_endpoint_not_found"
  }
}
429A request budget is used up (details.scope says which).
{
  "error": {
    "type": "rate_limit",
    "code": "rate_limited",
    "message": "Too many requests: slow down.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#rate_limited"
  }
}
500An error we did not expect.
{
  "error": {
    "type": "server",
    "code": "internal_error",
    "message": "Something went wrong on our side.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#internal_error"
  }
}
503A service this call needs did not answer.
{
  "error": {
    "type": "server",
    "code": "temporarily_unavailable",
    "message": "This cannot be done right now. Try again in a moment.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": true,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#temporarily_unavailable"
  }
}

Errors#

Codes this endpoint can return. Match on the code, never on the message.

Guides, endpoints, fields and error codes.