Skip to content
MothershipDevelopers

API referenceWebhooks

Update a webhook configuration

Updates the webhook configuration with the given webhookConfigId.

PUT/webhookConfigs/{webhookConfigId}
Environment
https://sandbox.api.mothership.com/beta
curl --request PUT \
  --url 'https://sandbox.api.mothership.com/beta/webhookConfigs/48asjgaoi33nkl4t3lae' \
  --header "Authorization: Bearer $MOTHERSHIP_API_TOKEN" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "webhookUrl": "https://www.yourserver.io/newWebhook/mothership",
  "subscribedEvents": [
    "shipment.status.updated"
  ]
}'
Reads your token from $MOTHERSHIP_API_TOKEN
Response
{
: {
: "48asjgaoi33nkl4t3lae",
: "2019-03-20T16:17:13.424Z",
: "active",
: [
"shipment.status.updated"
],
: "https://www.yourserver.io/newWebhook/mothership"
}
}

Hover a key to see what it means. Click it to jump to the field.

A change applies to events from then on. Deliveries already queued, and their retries, still go to the URL they were queued for.

Authorization: Bearer <token>

Your sandbox API token. See Authentication.

  • webhookConfigIdstringRequired

    ID of the webhook config to update

Request body

application/json · required
  • subscribedEventsarray of strings

    Events that trigger a webhook.

    billOfLading.createdbillOfLading.updatedproofOfDelivery.createdproofOfDelivery.updateddeliveryReceipt.createddeliveryReceipt.updatedcertificateOfInsurance.createdshipment.purchasedWhat each value means →
  • webhookUrlstring

    URL that Mothership POSTs webhook events to.

    • dataobject
      • idstringRequired

        ID of the webhook configuration.

      • createdAtstring<date-time>Required

        When this webhook configuration was created, as an ISO 8601 date-time.

      • statusstringRequired

        Current status of the webhook config

        activeinactive
      • subscribedEventsarray of stringsRequired

        Events that trigger a webhook.

        billOfLading.createdbillOfLading.updatedproofOfDelivery.createdproofOfDelivery.updateddeliveryReceipt.createddeliveryReceipt.updatedcertificateOfInsurance.createdshipment.purchasedWhat each value means →
      • webhookUrlstringRequired

        URL that Mothership POSTs webhook events to.

What's next